How can I change the RESTeasy client exception to a custom error when using the Proxy API?

Solution Verified - Updated -

Issue

  • When I try to access a REST WEB Service and I have a failure in client side, the exception is always ClientResponseFailure. How Can I change this exception to a custom exception?
  • We don't want to have WebApplicationException in our application, but instead, we want to use our custom error codes. Is this possible to map this exception to something else?

Environment

  • RESTEasy Client API
    • 2.x
    • 3.x
  • JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content