What's the right HTTP error code if parsing the request fails -


if create web service receives processes data xml/json , parsing of data fails because it's incorrect, do?

  • send http 400 error code: after client messed data (xml/json)
  • send http 500 error code: it's server wasn't able complete task

if data in request malformed, you'll want return 400 level error. 500-level errors mean wrong on server has nothing client or client's request.


Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -