Hello,
I would like to get confirmation of how to use the Error payload that appears in the OpenAPI schemas on GitHub.
Is my thinking below correct? Are there any formal specifications?
Specifically, I think ...
The "code" is for an error code ~ some application specific value.
The "reason" and "message" are for human consumption, so I assume they are text that supports the code. I.e. each code might have a reason and message that a user can use to better understand the code. Reason and message basically boil down to "short message", "long message".
The "status" looks to be analogous to the Microsoft IIS sub-codes (e.g. 400.1 400.2 etc) - i.e. a mechanism to categorise the error in the language of HTTP? A way to further slice up the HTTP status.
If we wish to return structured error data, i.e. more than a single code, then we would extend/subclass the object in the usual way (@type. @baseType).
Does this look right?
------------------------------
Alasdair MacLeod
BT Group plc
------------------------------