[openstack-dev] [api] Changing 403 Forbidden to 400 Bad Request for OverQuota was: [nova] Which error code should we return when OverQuota

Xu, Hejie hejie.xu at intel.com
Thu May 7 02:32:42 UTC 2015


Learn a lot again!   ++ for "sub-error-codes".

From: Everett Toews [mailto:everett.toews at RACKSPACE.COM]
Sent: Thursday, May 7, 2015 6:26 AM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [api] Changing 403 Forbidden to 400 Bad Request for OverQuota was: [nova] Which error code should we return when OverQuota

On May 6, 2015, at 1:58 PM, David Kranz <dkranz at redhat.com<mailto:dkranz at redhat.com>> wrote:


+1
The basic problem is we are trying to fit a square (generic api) peg in a round (HTTP request/response) hole.
But if we do say we are recognizing "sub-error-codes", it might be good to actually give them numbers somewhere in the response (maybe an error code header) rather than relying on string matching to determine the real error. String matching is fragile and has icky i18n implications.

There is an effort underway around defining such "sub-error-codes" [1]. Those error codes would be surfaced in the REST API here [2]. Naturally feedback is welcome.

Everett


[1] https://review.openstack.org/#/c/167793/
[2] https://review.openstack.org/#/c/167793/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150507/e2f30646/attachment.html>


More information about the OpenStack-dev mailing list