Can I call Dropwizard/Jersey exception mapping directly?

99 Views Asked by At

Is it possible to call the jersey exception mapper directly?

We've got a Dropwizard REST app, and we need to add a non-REST interface.
We've got a large number of exception mappers that are called implicitly when a service throws an exception.
We'd like to call the same exception mappers in our non-REST code because they map to an application error code and message as well as the final http response code.

We found org.glassfish.jersey.internal.ExceptionMapperFactory, but it's in an "internal" package.

Is there an interface we can call to map the exception?

0

There are 0 best solutions below