[RFC] Add "severity" to the error structure

Bug #1761475 reported by Dmitry Tantsur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-sig
Won't Fix
Undecided
Unassigned

Bug Description

I suggest adding optional severity to each error in http://specs.openstack.org/openstack/api-wg/guidelines/errors.html. This idea came from reviewing https://review.openstack.org/#/c/494534/ which is not aligned with our guidelines and does have severity as part of the error code. One use case for severity is to decide which of the errors in the errors list is the most critical. Another is for UI to display errors with different colors.

I cannot decide if we should use numeric constants or strings. Numeric constants can be sorted, strings are more user-friendly.

TBD:
1. type of severity
2. allowed values
3. the default

Dmitry Tantsur (divius)
description: updated
Revision history for this message
Chris Dent (cdent) wrote :

I'm not super inclined to do this. It's increasing the burden on the coder (when they add an error they need to figure out the right code and the right severity) and trying to put information in the error message that is potentially better kept in documentation. That is, once the code exists it is possible to look things up by the code and get all sorts of information because it is a (somewhat) unique identifier.

Also, severity is fairly subjective and context dependent.

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

i think this would be ok as an optional guideline, but in general i tend to agree with Chris.

at best i would mark this as wishlist

Changed in openstack-api-wg:
status: New → Won't Fix
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.