You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.
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..
From @trpedersen on August 26, 2013 6:27
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
Copied from original issue: krasserm#25
The text was updated successfully, but these errors were encountered: