-
Notifications
You must be signed in to change notification settings - Fork 424
Open
Labels
Description
We discovered that our current guideline about problem/json is interpreted somewhat differently (both between guild members, and by other developers in the company).
Some things to clarify (most related to each other):
- 1. Is the problem object meant just for the client developers (for debugging purposes), or is it also intended to be used by client applications?
- 1a. If the latter, only for display to a human (e.g. in an UI), or also for automatic processing decisions?
- 2. What is the intended meaning of the
type
(+title
) member, compared to the status code?- 2a. Should the problem types be defined in your API? (How?) Should they be standardized across APIs?
- 2b. Can clients rely on the type attribute?
- 2c. Is this the same as an "error code"?
- 3. What is the meaning of the
instance
field?- 3a. Does pointing to a specific occurrence of an error is meant to point to a code location, or to a set of input data or time when this error happened (e.g. via flow-ID)?
- 3b. When is this needed/useful in addition to the type?
- 4. For cases where a server application doesn't have more detailed error information, should fields (e.g.
type
+title
) be filled with default values replicating the status code information, or just be left empty/missing? - 5. What are compatibility concerns for problem objects? Is it an incompatible change if in some specific situation now a different
type
value is returned? - 6. How can/should the problem object be extended?
- 6a. Use the
type
as a discriminator for subtyping? - 6b. How can extended problems and generic ones coexist?
- 6a. Use the
- 7. Client robustness: Can clients rely on anything in the error object? If not, can they still use something?
(Also, if we are looking at this guideline: Fix the typo instant
β instance
in the first paragraph.)
tkrop