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

Michael McCune elmiko at redhat.com
Thu May 23 16:53:44 UTC 2019


On Mon, May 20, 2019 at 10:59 AM Colleen Murphy <colleen at gazlene.net> wrote:
> 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?


hi Colleen,

i will attempt to answer your questions, but it has been quite awhile
since i (apparently) approved that guideline.

i don't remember the specifics of that discussion, but as Chris
pointed out the idea was that there are conditions where a single call
will result in several errors that /may/ be of interest to caller. we
decided that adding a list for this object was a low bar to pass for
being able to support those conditions.

for example, a call to sahara to deploy a hadoop cluster might result
in several nodes of the cluster failing to deploy and thus an error
for a call to "create an entire hadoop cluster" might need to return a
dense error message. (note, i don't think this is how it's actually
done, but i just wanted to provide an example and i happen to know
sahara better than other services)

to your question about other examples outside of openstack, i can't
provide anything further. i vaguely recall that we had a suggested
format that included the list of errors, but in looking back through
my materials i can't find it. i want to say that it was something like
a json-home (it wasn't json-home, but similar in spirit) type spec in
which it was suggested.

these guidelines are not written in stone, and perhaps we need to
revisit this one. although given that folks are now implementing it,
that might be troublesome in other ways.

i hope that helps at least shed some light on the thought process.

peace o/



More information about the openstack-discuss mailing list