Skip to content

GH-1572 Report reactive function failures to the HTTP client - #1577

Open
seonwooj0810 wants to merge 1 commit into
spring-cloud:mainfrom
seonwooj0810:fix/issue-1572-reactive-web-failures
Open

seonwooj0810 wants to merge 1 commit into
spring-cloud:mainfrom
seonwooj0810:fix/issue-1572-reactive-web-failures

Conversation

@seonwooj0810

Copy link
Copy Markdown
Contributor

Fixes #1572

FunctionWebRequestProcessingHelper collected a Flux result with onErrorContinue(...), so a failing element was only logged and the client got 200 with a partial list. The result of a consumer was subscribed to without an error handler.

  • A failure in a Flux result is now propagated, so the client gets an error response (500 for an unhandled exception) on both WebFlux and MVC.
  • A consumer failure is logged with the function name. The response is still 202.

Behavior change: the WebFlux errorJson test asserted the partial ["foo"] response. It now expects 500, 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 onErrorContinue and are unchanged.

Verification done: the two errorJson tests and the new consumerFailureIsLogged test fail without the change and pass with it. mvnw clean install in spring-cloud-function-web passes (252 tests, 0 failures, 24 skipped). No other open PR for this issue, and the problem is still present on current main.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reactive web path hides function failures from the client

1 participant