<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 2, 2014 at 7:21 PM, Christopher Yeoh <span dir="ltr"><<a href="mailto:cbkyeoh@gmail.com" target="_blank">cbkyeoh@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>
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.<br>

<br><a href="https://review.openstack.org/#/c/95671/" target="_blank">https://review.openstack.org/#/c/95671/</a><br><br></div>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. <br>


<br></div></div></div></div></blockquote><div><br></div><div>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.</div>

<div><br></div><div>+1 for 403</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">

<div><div><div></div>Its not totally clear from the rfc (<a href="http://www.ietf.org/rfc/rfc2616.txt" target="_blank">http://www.ietf.org/rfc/rfc2616.txt</a>) 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.<br>


<br></div>Anyone have any objections to this?<br><br></div><div>Regards,<br></div><div><br></div>Chris<br></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div></div>