diff --git a/guidelines/errors-schema.json b/guidelines/errors-schema.json index cf2a3f9..48aba7a 100644 --- a/guidelines/errors-schema.json +++ b/guidelines/errors-schema.json @@ -17,7 +17,7 @@ }, "code": { "type": "string", - "description": "A service-specific error code. The general form of the code is service-name.error-code. service-name MUST be the service name as defined by the service field of https://git.openstack.org/cgit/openstack/governance/tree/reference/projects.yaml where spaces within the service name are replaced by '-' and if the word 'service' appears in the name, it MUST be omitted. error-code is defined by service project team and MUST only consist of lowercase alpha, numeric, '.', and '-' characters." + "description": "A service-specific error code. The general form of the code is service-type.error-code. service-type MUST be the service type as defined by the service types authority at http://specs.openstack.org/openstack/service-types-authority. error-code is defined by service project team and MUST only consist of lowercase alpha, numeric, '.', and '-' characters." }, "status": { "type": "integer", diff --git a/guidelines/errors.rst b/guidelines/errors.rst index 4e31b9d..0c485d3 100644 --- a/guidelines/errors.rst +++ b/guidelines/errors.rst @@ -12,6 +12,13 @@ consistency of the error messages returned to them will play a large part in how quickly they can learn the API, how they can be more effective with the API, and how much they enjoy using the API. +This document describes an emerging standard within OpenStack for providing +structured error responses that can be consistently processed and include +coding that will eventually allow errors to be searched for on the web and in +documentation using the value of the ``code`` field. Such codes help to +distinguish the causes of different errors in response to the same HTTP method +and URI, even when the same HTTP status is returned. + Errors JSON Schema ------------------