- From: Julian Reschke <julian.reschke@gmx.de>
- Date: Wed, 03 Feb 2010 20:20:19 +0100
- To: troels knak-nielsen <troelskn@gmail.com>
- CC: ietf-http-wg@w3.org
troels knak-nielsen wrote: > Hi list. > > There is a question on stack overflow [1] about the proper status code > for a response where the server side validation fails. > The best suggestions seems to be 400 or 409, but is 409 really the > proper response in this situation? > > [1] http://stackoverflow.com/questions/2190945/what-http-response-code-for-rest-service-on-put-method-when-domain-rules-invalid 422 seems to be applicable: "The 422 (Unprocessable Entity) status code means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions. For example, this error condition may occur if an XML request body contains well-formed (i.e., syntactically correct), but semantically erroneous, XML instructions." -- <http://greenbytes.de/tech/webdav/rfc4918.html#rfc.section.11.2>
Received on Wednesday, 3 February 2010 19:21:42 UTC