question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rest-Client-Reactive: Allow disabling contextual error messages

See original GitHub issue

Description

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:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TomasHofmancommented, Jan 20, 2022

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.

0reactions
gsmetcommented, Jan 25, 2022

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing REST Services with RESTEasy Reactive - Quarkus
Exception mapping. If your application needs to return non-nominal HTTP codes in error cases, the best is to throw exceptions that will result ......
Read more >
How to Enable/Disable Error Messages - Mura Docs v7.0
Open the file located at {context}/config/settings.ini.cfm · Locate the setting labeled debuggingenabled. true. If set to true , error messages will appear to ......
Read more >
quarkusio/quarkus 2.8.0.CR1 on GitHub - NewReleases.io
Code from Kafka guide doesn't work. ... #22777 - Rest-Client-Reactive: Allow disabling contextual error messages; #22645 - @ThreadContextConfig does not ...
Read more >
Disabling SQL error messages (instance security hardening)
Use the glide.db.loguser property to disable SQL error messages from rendering in a browser.
Read more >
Would error messages improve if we could disable features?
I'm not convinced that ignoring certain features for the sake of error messages would be helpful. For one thing, are the errors encountered...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found