[openstack-dev] [keystone]Why not common definition about normal HTTP status code like 2xx and 3xx?
ian.cordasco at RACKSPACE.COM
Tue Jun 2 15:36:38 UTC 2015
On 6/2/15, 04:45, "Boris Bobrov" <bbobrov at mirantis.com> wrote:
>On Tuesday 02 June 2015 09:32:45 Chenhong Liu wrote:
>> There is keystone/exception.py which contains Exceptions defined and
>> inside keystone provide 4xx and 5xx status code. And we can use it like:
>> exception.Forbidden.code, exception.forbiddent.title
>> exception.NotFound.code, exception.NotFound.title
>> This makes the code looks pretty and avoid error prone. But I can't find
>> definition for other status code, like 200, 201, 204, 302, and so on.
>> code in keystone, especially the unit test cases, just write these
>> code and title explicitly.
>> How about add those definitions?
>These are standard HTTP codes:
>Description in exceptions is given because one error code can be used for
>several errors. Success codes always have one meaning.
2616 is dead. Please reference 723[0-5] from now on.
More information about the OpenStack-dev