Re: [rest-discuss] 418 Invalid [was HTTP Status code question]

... Actually, Julian just pointed out to me that WebDAV already defined a 422 (Unprocessable Entity) status code which is probably sufficient

Message 1 of 36
, May 3, 2006

0 Attachment

On Mar 24, 2006, at 5:05 PM, Bill de hÓra wrote:

> Roy T. Fielding wrote:
>> On Mar 24, 2006, at 7:55 AM, Bill de hÓra wrote:
>>
>>> 418 Invalid
>>>
>>> The request could not be completed due to a validation failing
>>> against
>>> the sent entity. This code is only allowed in situations where it is
>>> expected that the user might be able to resubmit the request with
>>> valid
>>> content and where the sent content was syntactically correct
>>> according
>>> to its media type. The response body SHOULD include enough
>>> information
>>> for the user to recognize the source of the conflict.
>>> Invalidations are
>>> most likely to occur in response to a PUT or POST request.
>>
>> Yep, that's what I would do, though a properly specified response
>> code
>> would never include that second sentence "This code is only
>> allowed ..."
>> since servers are always right (and never omnipotent). And the last
>> sentence is kind of goofy -- request payload is unlikely to be
>> invalid when it isn't present.
>>
>> Do you want me to standardize it?
>
> Yes please.

Actually, Julian just pointed out to me that WebDAV already
defined a 422 (Unprocessable Entity) status code which is
probably sufficient