-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix NPE when calling a ClientResponseFilter #41749
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Thanks for this! I am actually very interested in seeing a sample that exhibits the NPE you mention so we can understand the exact conditions under which it occurs. |
@geoand Sure! This is the test project I was working on to debug this: https://github.com/rober710/resteasy-reactive-reproducer Note that this is a workaround for another issue: currently using the resteasy-reactive-client it's not possible to read the response on error, due to this: Line 31 in 6d25d0a
Line 36 in 6d25d0a
Is it ok to make changes to those classes so that the response can be passed to the exception and made available to consumers? I'm working on a PR on that as well. Just wanted to understand if there's a reason a DummyResponse is created instead of a full response object with the entity returned by the server. |
Thanks for the explanation! I think that we should actually do |
@geoand Done! It works calling the method there as well. |
Great! Can you please squash the commits? |
78ac6fa
to
2b12c11
Compare
2b12c11
to
b5f5508
Compare
Status for workflow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
When using the resteasy-reactive-client to make http calls, an NPE is thrown when using a custom filter and exception mapper. Here's the code to reproduce this:
Here's the stacktrace of the exception:
This happens in Quarkus 3.11.0 and also tested in latest 3.12.1. When making the change in this PR, compiling and using the generated snapshot, I'm able to read the response as expected.