I am using Jersey 1.14 for REST in JAVA. If there is any error in POST body of a resource, Jersey throws and exception which mentions my internal classes to client.
I continue wanting to give them error when the error is passed from my application, but suppress errors that are being thrown by Jersey(for the requests which does not even get to my application, as Jersey identifies the exception and throw it).
I searched for any flag to achieve this, but could not find anything. Is there a way to do this?
EDIT:
Rephrasing the question: mute/suppress error stack trace for invalid input in jersey
UPDATE:
I tried using ExceptionMapper, catching java.lang.Exception. It catches excpetion like when there is Content-Type missing, but fails to catch exception when there is an error in object conversion.
No comments:
Post a Comment