Issue 11521

Web services need to return BAD REQUEST 400 when a POST/PUT includes an invalid value for the data type expected

11521
Reporter: jcuadra
Assignee: jcuadra
Type: SubTask
Summary: Web services need to return BAD REQUEST 400 when a POST/PUT includes an invalid value for the data type expected
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2012-06-28 15:57:33.408
Updated: 2013-12-16 17:51:00.094
Resolved: 2012-07-03 11:32:32.614
        
Description: When a POST/PUT request happens, and for example the request includes a non-numeric value in a numeric field, Jackson's JSON Processor throws right now a 500 error when trying to deserialize this. We need to catch this to return a 400 BAD REQUEST.

This is different than when trying to POST/PUT an unknown property. This particular cases are already handled on: http://code.google.com/p/gbif-common-resources/source/browse/gbif-common-ws/trunk/src/main/java/org/gbif/ws/json/JacksonJsonContextResolver.java]]>
    


Author: jcuadra@gbif.org
Comment: issue solved.
Created: 2012-07-03 11:32:32.649
Updated: 2012-07-03 11:32:32.649