<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 2, 2015 at 5:46 PM Boris Bobrov <<a href="mailto:bbobrov@mirantis.com">bbobrov@mirantis.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tuesday 02 June 2015 09:32:45 Chenhong Liu wrote:<br>
> There is keystone/exception.py which contains Exceptions defined and used<br>
> inside keystone provide 4xx and 5xx status code. And we can use it like:<br>
>     exception.Forbidden.code, exception.forbiddent.title<br>
>     exception.NotFound.code, exception.NotFound.title<br>
><br>
> This makes the code looks pretty and avoid error prone. But I can't find<br>
> definition for other status code, like 200, 201, 204, 302, and so on. The<br>
> code in keystone, especially the unit test cases,  just write these status<br>
> code and title explicitly.<br>
><br>
> How about add those definitions?<br>
<br>
These are standard HTTP codes:<br>
<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" target="_blank">http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html</a><br>
<br>
Description in exceptions is given because one error code can be used for<br>
several errors. Success codes always have one meaning.<br></blockquote><div><br></div><div>I know HTTP codes. I mean writing something like module.OK or module.NoConent is better than writting '200 OK' or '204 No Conent'.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--<br>
Best regards,<br>
Boris Bobrov<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</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>
</blockquote></div></div>