-
Enhancement
-
Resolution: Done
-
Trivial
-
None
-
None
I have created a client for an API. This API returns an error code in the body, along with the HTTP status code. In the ClientInvocation class, the method handleErrorStatus maps the HTTP status to its corresponding exception, which is fine, but I would like to throw a custom exception from the client and have the API error code in that exception. If I try to do that, and since all filters are within a try-catch (where one catch is Throwable), the exception thrown from the filter is wrapped in a ResponseProcessingException, or ProcessingException, depending on which filter type of filter throws the exception. I think that allowing a filter to handle the HTTP request and response, if one needs, offers greater flexibility, without breaking the current default error handling.
- relates to
-
RESTEASY-1685 Resteasy client throws WebApplicationException when ClientRequestFilter is used
- Closed