Skip to content
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

Never propagate a WebApplicationException from the client #19630

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

stuartwdouglas
Copy link
Member

If a call fails on the server it should be treated as an internal server
error, it should not be propagating the response back to the original
request.

Fixes #19488

If a call fails on the server it should be treated as an internal server
error, it should not be propagating the response back to the original
request.

Fixes quarkusio#19488
var res = super.unwrapException(t);
if (res instanceof WebApplicationException) {
WebApplicationException webApplicationException = (WebApplicationException) res;
return new ClientWebApplicationException(webApplicationException.getMessage(), webApplicationException,
Copy link
Contributor

@gastaldi gastaldi Aug 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The WebApplicationException cause should be propagated here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should.

I'm only wondering if it wouldn't be slightly better if webApplication.getCause() was passed as the cause and not webApplication

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, it does loose a bit of context as to where the original exception came from (e.g. a filter could directly throw it with no cause.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, let's leave it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Either RESTEasy Reactive/REST Client Reactive swallow errors in some scenarios, very difficult to debug
5 participants