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

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -