For my REST api I\'m using jersey and ExceptionMapper to catch global exceptions. It works well all the exception my app throws but I\'m unable to catch exception thrown by
Hi it seems to exits an alternative answer now that does not require to disable Jersey AUTO_DISCOVERY feature.
Just annotate your own exception mapper with a @Priority(1) annotation. The lower the number, the higher the priority. Since Jackson's own mappers do not have any priority annotation, yours will be executed:
@Priority(1)
public class MyJsonMappingExceptionMapper implements ExceptionMapper