Errors guidelines reference service name, should be type

Bug #1756464 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-sig
Fix Released
Medium
Chris Dent

Bug Description

In the Errors guideline: http://specs.openstack.org/openstack/api-wg/guidelines/errors.html there is discussion about error codes which uses the service _name_ as a namespace.

Should this be "type"?

I think it should, since as a general rule we don't like to use the project name as a "public" thing. However, that requires that any other implementation of a service type (presumably such a thing is possible, even though not probable) must use the same error codes, which implies that they are the same API.

I've heard both sides of this: some (most?) people say service type _is_ the API.

In any case, it is likely that the errors doc needs to be updated.

If it does, then there's chance that other older docs do as well.

Revision history for this message
Michael McCune (mimccune) wrote :

the main downside i can see from switching to the service type instead of the service name would be a situation where there are multiple services which could satisfy a type. that would become confusing in the error output to determine where the actual error originated.

i'm not sure if this is an actual problem that would exist though or merely a hypothetical. i don't personally have an issue with changing this to the service type but it would be nice to hear from someone in the operators group as they would actually deal with these issues more frequently.

Changed in openstack-api-wg:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Chris Dent (cdent)
Chris Dent (cdent)
Changed in openstack-api-wg:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-wg (master)

Reviewed: https://review.openstack.org/554921
Committed: https://git.openstack.org/cgit/openstack/api-wg/commit/?id=f094748e92c7ca3d22d64b98aeda7ba3c0f1740e
Submitter: Zuul
Branch: master

commit f094748e92c7ca3d22d64b98aeda7ba3c0f1740e
Author: Chris Dent <email address hidden>
Date: Wed Mar 21 13:22:50 2018 +0000

    Update the errors guidance to use service-type for code

    Also, explain a bit about why errors exist and how the code
    can be used.

    Change-Id: Idcb4d11f7ff9867dfe29b47dcfd9774ed269ab3e
    Closes-Bug: #1756464

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.