W3C home > Mailing lists > Public > ietf-http-wg@w3.org > January to March 2010

Re: Clarification of http-409

From: Julian Reschke <julian.reschke@gmx.de>
Date: Wed, 03 Feb 2010 20:20:19 +0100
Message-ID: <4B69CC73.1020200@gmx.de>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:16 GMT