[openstack-dev] [keystone]Why not common definition about normal HTTP status code like 2xx and 3xx?

Chenhong Liu liuchenhong at unitedstack.com
Tue Jun 2 09:32:45 UTC 2015


There is keystone/exception.py which contains Exceptions defined and used
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. The
code in keystone, especially the unit test cases,  just write these status
code and title explicitly.

How about add those definitions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150602/94d0c271/attachment.html>


More information about the OpenStack-dev mailing list