-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
3.0.21.Final
-
None
I am using ReasyEasy as the Provider.And in my code i have defined a custom exception mapper some thing like this
public class CustomExceptionMapper implements ExceptionMapper<Exception > {
@Override
public Response toResponse(final Exception exception) {
//have my own logic to map the error response to a JSON format
}
}
I have the following jars in my project
resteasy-clinet (3.0.21)
resteasy-spring (3.0.21)
resteasy-jaxrs(3.0.21)
resteasy-jackson2-provider (3.0.21)
So for unrecognized field exception i was expecting it would be caught in my custom exception mapper.How ever when i debugged in it
It reaches to the following class
@Provider
public class UnrecognizedPropertyExceptionHandler implements ExceptionMapper<UnrecognizedPropertyException> {
@Override
public Response toResponse(UnrecognizedPropertyException exception)
}
which is part of reasteasy-jacson2-provider.3.0.21-final
the problem there is it is sending the message plain text_html how ever i want a proper JSON.
I am not sure why it is not triggered .Rest all other types of exceptions lie runtime exceptions or any custom exceptions are caught in my custom exception mapper but not for this one.
Is there any thing i am doing wrong here..?
- is related to
-
JBEAP-11819 Document exception mapper for UnrecognizedPropertyException
- Closed
-
RESTEASY-1674 Document exception mapper for UnrecognizedPropertyException
- Closed