New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebFluxRequestExecutingMessageHandler directly creates WebClientResponseException rather than using provided create(...) factory method #3610
Labels
Milestone
Comments
djgraff209
added
status: waiting-for-triage
The issue need to be evaluated and its future decided
type: bug
labels
Aug 6, 2021
djgraff209
added a commit
to djgraff209/spring-integration
that referenced
this issue
Aug 6, 2021
This fix changes the WebFluxRequestExecutingMessageHandler The change specifically changes the contruction of the WebClientResponseException to use the `create` factory method. This change addresses issue spring-projects#3610.
artembilan
added
backport 5.3.x
in: webflux
and removed
status: waiting-for-triage
The issue need to be evaluated and its future decided
labels
Aug 9, 2021
artembilan
pushed a commit
that referenced
this issue
Aug 9, 2021
Fixes #3610 This fix changes the WebFluxRequestExecutingMessageHandler The change specifically changes the contruction of the WebClientResponseException to use the `create` factory method. * Added changes and unit test to cover updated code Updated code to use simplified exception construction that is more tolerant of larger payloads. Updated unit tests to check for specific exception types. * Corrected checkstyle errors Corrected checkstyle error in imports. Corrected whitespace between casts. Corrected trailing whitespace. * Added @author **Cherry-pick to `5.4.x` & `5.3.x`**
artembilan
pushed a commit
that referenced
this issue
Aug 9, 2021
Fixes #3610 This fix changes the WebFluxRequestExecutingMessageHandler The change specifically changes the contruction of the WebClientResponseException to use the `create` factory method. * Added changes and unit test to cover updated code Updated code to use simplified exception construction that is more tolerant of larger payloads. Updated unit tests to check for specific exception types. * Corrected checkstyle errors Corrected checkstyle error in imports. Corrected whitespace between casts. Corrected trailing whitespace. * Added @author **Cherry-pick to `5.4.x` & `5.3.x`**
artembilan
pushed a commit
that referenced
this issue
Aug 9, 2021
Fixes #3610 This fix changes the WebFluxRequestExecutingMessageHandler The change specifically changes the contruction of the WebClientResponseException to use the `create` factory method. * Added changes and unit test to cover updated code Updated code to use simplified exception construction that is more tolerant of larger payloads. Updated unit tests to check for specific exception types. * Corrected checkstyle errors Corrected checkstyle error in imports. Corrected whitespace between casts. Corrected trailing whitespace. * Added @author **Cherry-pick to `5.4.x` & `5.3.x`** # Conflicts: # spring-integration-webflux/src/main/java/org/springframework/integration/webflux/outbound/WebFluxRequestExecutingMessageHandler.java # spring-integration-webflux/src/test/java/org/springframework/integration/webflux/outbound/WebFluxRequestExecutingMessageHandlerTests.java
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In what version(s) of Spring Integration are you seeing this issue?
5.3.8.RELEASE
Describe the bug
The
WebFluxRequestExecutingMessageHandler
is directly creating aWebClientResponseException
rather than using the providedcreate
factory methods. This can cause some confusion when attempting to use thecustomizeMonoReply
method to trap and provide a default response payload.To Reproduce
Assume a RESTful endpoint that will return an HTTP/404 error when an entity is not found.
Using an integration flow similar to the following:
Expected behavior
Expectation is that resulting message, when an HTTP/404 error occurs, contains the header
mix-entry-id
with the value of-1
.Sample
https://github.com/djgraff209/so68637283
The text was updated successfully, but these errors were encountered: