[keystone][placement][neutron][api-sig] http404 to NotFound, or how should a http json error body look like?

Chris Dent cdent+os at anticdent.org
Mon May 20 14:59:37 UTC 2019


On Mon, 20 May 2019, Colleen Murphy wrote:

>>> Make keystoneauth1 interpret two diferent types of errors response:
>>> the one it does, and the one in the api-sig guidelines. Note that
>>> I've yet to see any context where there is more than one error in
>>> the list, so it is always errors[0] that gets inspected.
>
> We'll happily accept patches to keystoneauth that make it compliant with the API-SIG's guidelines (as long as it is backwards compatible).
>
> I gotta say, though, this guideline on error handling really takes me aback. Why should a single HTTP request ever result in a list of errors, plural? Is there any standard, pattern, or example *outside* of OpenStack where this is done or recommended? Why?

I can't remember the exact details (it was 4 years ago [1]) but I
think the rationale was that if there was a call behind the call it
would be useful and important to be able to report a stack of
errors: I called neutron and it failed like this, and I failed as a
result of that failure, like this.

I agree it is a bit weird but it seems the guideline had some
acclaim at the time so...

Ed or Monty may have additional recollections.k

[1] https://review.opendev.org/#/c/167793/

-- 
Chris Dent                       ٩◔̯◔۶           https://anticdent.org/
freenode: cdent


More information about the openstack-discuss mailing list