Thanks for the good work with this plugin - it is working well for us.
An improvement though - if a client programs sends through invalid JSON or XML then the JSONReader and XMLReader code falls over with an uncaught exception (e.g. JsonException) causing an HTTP 500 error back at the client. IMHO this should be instead caught and send back to the client as a BAD_REQUEST (or similar) message, rather than a server error.
The two ..readFrom methods should catch any exceptions raised during xml or json parsing and wrap them in a WebApplicationException with the appropriate Response+status+entity+type set.
I've worked around it by using ExceptionMappers for now..
Hi,
Thanks for the good work with this plugin - it is working well for us.
An improvement though - if a client programs sends through invalid JSON or XML then the JSONReader and XMLReader code falls over with an uncaught exception (e.g. JsonException) causing an HTTP 500 error back at the client. IMHO this should be instead caught and send back to the client as a BAD_REQUEST (or similar) message, rather than a server error.
The two ..readFrom methods should catch any exceptions raised during xml or json parsing and wrap them in a WebApplicationException with the appropriate Response+status+entity+type set.
I've worked around it by using ExceptionMappers for now..
Tim Pedersen