Skip to content

Commit

Permalink
JAXRSProvidersClientIT fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Nov 15, 2023
1 parent d5b1ff6 commit 0f46502
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,15 @@ JaxRsService toJerseySupport(JaxRsApplication jaxRsApplication,
injectionManager);
}

// @Priority does not have any effect. This should map to Exception,
// but it is invoked before user ExceptionMapper. This probably requires an issue.
@Provider
private static class CatchAllExceptionMapper implements ExceptionMapper<Exception> {
private static class CatchAllExceptionMapper implements ExceptionMapper<Throwable> {
@Context
private ServerRequest serverRequest;

@Override
public Response toResponse(Exception exception) {
public Response toResponse(Throwable exception) {
serverRequest.context().register("unmappedException", exception);
if (exception instanceof WebApplicationException wae) {
return wae.getResponse();
Expand Down

0 comments on commit 0f46502

Please sign in to comment.