Expose request URI in McpHttpClientAuthorizationErrorHandler#980
Open
Kehrlann wants to merge 1 commit into
Open
Expose request URI in McpHttpClientAuthorizationErrorHandler#980Kehrlann wants to merge 1 commit into
Kehrlann wants to merge 1 commit into
Conversation
a5a866f to
2b9406d
Compare
2b9406d to
87869cb
Compare
Breaking change Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
87869cb to
065c2a7
Compare
chemicL
requested changes
May 22, 2026
| * @return {@link Publisher} emitting true if the original request should be replayed, | ||
| * false otherwise. | ||
| */ | ||
| Publisher<Boolean> handle(HttpResponse.ResponseInfo responseInfo, HttpRequestSnapshot requestSnapshot, |
Member
There was a problem hiding this comment.
Somehow having the response info before the request info feels counter-intuitive. Can we make the requestSnapshot be the first argument?
| * @param context the MCP client transport context | ||
| * @return true if the original request should be replayed, false otherwise. | ||
| */ | ||
| boolean handle(HttpResponse.ResponseInfo responseInfo, HttpRequestSnapshot requestSnapshot, |
Member
There was a problem hiding this comment.
If possible, let's change the order here too.
| public McpHttpClientTransportAuthorizationException(String message, HttpResponse.ResponseInfo responseInfo) { | ||
| private final HttpRequestSnapshot requestSnapshot; | ||
|
|
||
| public McpHttpClientTransportAuthorizationException(String message, HttpResponse.ResponseInfo responseInfo, |
Member
There was a problem hiding this comment.
I wouldn't mind reversing the order of response and request here either :)
| void whenFalseThenError() { | ||
| McpHttpClientTransportAuthorizationErrorHandler handler = McpHttpClientTransportAuthorizationErrorHandler | ||
| .fromSync((info, snapshot, ctx) -> false); | ||
| StepVerifier.create(handler.handle(responseInfo, requestSnapshot, context)).expectNext(false).verifyComplete(); |
Member
There was a problem hiding this comment.
The test name and the behaviour don't seem to match. The test verifies completion, while the test name mentions error. Should it be aligned?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #865
Deprecating the existing API in favor of a new (very similar)
McpHttpClientTransportAuthorizationErrorHandler.