Rest-Client-Reactive: Allow disabling contextual error messages
See original GitHub issueDescription
When calling Rest Client Reactive stubs, every custom WebApplicationException
(via ResponseExceptionMapper
) is returned wrapped as a ClientWebApplicationException
with a contextual, debug friendly, exception message (“Received xxx when invoking Rest Client method yyy”). Usually, you don’t want to expose such implementation detail to clients, so such exceptions would have to be unwrapped before returning.
Please promote System property “quarkus.rest-client.disable-contextual-error-messages” used at org.jboss.resteasy.reactive.client.impl.RestClientRequestContext#unwrapException
to a full-fledged configuration option, so that WebApplicationExceptions
may be returned unchanged (just like “old” Resteasy used to do).
Implementation ideas
Promote System property “quarkus.rest-client.disable-contextual-error-messages” to a configurable option obtained via MP-Config.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top GitHub Comments
There was a discussion in https://github.com/quarkusio/quarkus/pull/22103 going on in the direction that there is already a system property
quarkus.rest-client.disable-contextual-error-messages
for disabling this detailed exception, and that it could be turned into a proper configuration property. I’m going to look at that.I wonder if we should have a mechanism that disables the wrapping simply if the exception is already of the right type? By extending this exception for the ones for which you don’t want wrapping, you could very easily disable the wrapping for a specific class of errors.
Not sure if it makes sense?