Repository navigation
GH-1572 Report reactive function failures to the HTTP client - #1577
Open
seonwooj0810 wants to merge 1 commit into
Open
seonwooj0810 wants to merge 1 commit into
seonwooj0810 wants to merge 1 commit into
Conversation
Do not drop failing elements of a Flux result. The failure was only logged and the client received a 200 response with a partial list. It is now propagated, so the client receives an error response. Subscribe to the result of a consumer with an error handler that logs the failure, instead of leaving it to the Reactor dropped error hook. Resolves spring-cloud#1572 Signed-off-by: seonwoo_jung <79202163+seonwooj0810@users.noreply.github.com>
This branch has not been deployed
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.
Fixes #1572
FunctionWebRequestProcessingHelpercollected aFluxresult withonErrorContinue(...), so a failing element was only logged and the client got200with a partial list. The result of a consumer was subscribed to without an error handler.Fluxresult is now propagated, so the client gets an error response (500for an unhandled exception) on both WebFlux and MVC.202.Behavior change: the WebFlux
errorJsontest asserted the partial["foo"]response. It now expects500, as described in the issue. The MVC version of that test was disabled with "Fix error handling" and is enabled again with the same expectation.Server-sent event responses did not use
onErrorContinueand are unchanged.Verification done: the two
errorJsontests and the newconsumerFailureIsLoggedtest fail without the change and pass with it.mvnw clean installinspring-cloud-function-webpasses (252 tests, 0 failures, 24 skipped). No other open PR for this issue, and the problem is still present on currentmain.