-
Notifications
You must be signed in to change notification settings - Fork 3k
Make response available on error in rest client #46826
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
Make response available on error in rest client #46826
Conversation
We already had ClientWebApplicationException
|
@FroMage I'd just like to check, as far as I recall, the reason it was done was to avoid sensitive headers contained in the error response leaked to the client. Does this PR change it, or is it totally unrelated to that constraint ? |
|
Yes, this would add the headers back, but that was already the case, as it turns out, in most of the cases, because we had another type of web client exception with zero protection for hiding the Response like this type has. And that type was used a lot more. If I add the protections to the other type, lots of tests fail, because clients expect the Now, given the fact that we have the most used type of client exception actually contain a The only risk remaining is a user risk of adding their own |
Good to know, thanks, I believe tests are also available
I agree, users who write client exception mappers should be able to see the response headers while Quarkus REST can't prevent the custom mappers leaking them by mistake. |
Status for workflow
|
|
@FroMage I assume we should move ahead with this one? |
|
Yes |
|
I can't seem to be able to merge ATM, though. I'm getting errors. |
Alternate PR for #45282
This removes the duplicate web client exception, and restores the
Responseit contains.