[openstack-dev] [all] HTTP REST API error status code for out of quota errors

2014-06-02 Thread Christopher Yeoh
Hi,

There's been a few patches like this floating around recently which fix the
incorrect use of 413 as the http error code when a request fails because of
the requestor is out of quota.

https://review.openstack.org/#/c/95671/

Now 413 is definitely wrong, but sometimes the change is made to 400 or
403. Having had a look around at different REST APIs (non openstack) out
there, 403 does seem to be the most popular choice.

Its not totally clear from the rfc (http://www.ietf.org/rfc/rfc2616.txt)
what it should be, but 403 to me does seem to the most appropriate, and
whilst its not a big thing I think we should at least be consistent about
this across all our openstack REST APIs.

Anyone have any objections to this?

Regards,

Chris
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [all] HTTP REST API error status code for out of quota errors

2014-06-02 Thread Ken'ichi Ohmichi
2014-06-03 9:21 GMT+09:00 Christopher Yeoh cbky...@gmail.com:
 Hi,

 There's been a few patches like this floating around recently which fix the
 incorrect use of 413 as the http error code when a request fails because of
 the requestor is out of quota.

 https://review.openstack.org/#/c/95671/

 Now 413 is definitely wrong, but sometimes the change is made to 400 or 403.
 Having had a look around at different REST APIs (non openstack) out there,
 403 does seem to be the most popular choice.

 Its not totally clear from the rfc (http://www.ietf.org/rfc/rfc2616.txt)
 what it should be, but 403 to me does seem to the most appropriate, and
 whilst its not a big thing I think we should at least be consistent about
 this across all our openstack REST APIs.

+1 for 403.
The 403 words
  The server understood the request, but is refusing to fulfill it.
  Authorization will not help and the request SHOULD NOT be repeated.
would fit to out of quota.


Thanks
Ken'ichi Ohmichi

___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [all] HTTP REST API error status code for out of quota errors

2014-06-02 Thread Dolph Mathews
On Mon, Jun 2, 2014 at 7:21 PM, Christopher Yeoh cbky...@gmail.com wrote:

 Hi,

 There's been a few patches like this floating around recently which fix
 the incorrect use of 413 as the http error code when a request fails
 because of the requestor is out of quota.

 https://review.openstack.org/#/c/95671/

 Now 413 is definitely wrong, but sometimes the change is made to 400 or
 403. Having had a look around at different REST APIs (non openstack) out
 there, 403 does seem to be the most popular choice.


400 is wrong as well: The request could not be understood by the server
due to malformed syntax. In this case, the syntax is fine, it's the
requested action that the server is rejecting.

+1 for 403


 Its not totally clear from the rfc (http://www.ietf.org/rfc/rfc2616.txt)
 what it should be, but 403 to me does seem to the most appropriate, and
 whilst its not a big thing I think we should at least be consistent about
 this across all our openstack REST APIs.

 Anyone have any objections to this?

 Regards,

 Chris

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev