If you create a web service which receives an processes some data like XML
/JSON
and the parsing of the data fails because it's incorrect, what do you do?
XML
/JSON
)If data in the request is malformed, then you'll want to return a 400 level error. Generally 500-level errors mean that something is wrong on the server that has nothing to do with the client or the client's request.