[ADP-403] Problem Type Design
Core Principles
- URI Reference: MUST be a human-readable URI reference.
TIP
According to RFC 9457, the
type
field must be a relative or absolute URI. In practice, thetype
should be designed to be human-readable. Avoid opaque or meaningless URIs such as/1234088abc
—prefer descriptive, hierarchical URIs. - Relative URI: When the publication location is uncertain, MAY use a relative URI reference.
Design Process
- Review existing HTTP status codes, referencing ADP-200.
- For exact matches, use
type: about:blank
or the URI reference conversion of the HTTP status code (e.g.,/problems/not-found
). - Use the
detail
field to provide methods for correcting errors. - If there is no matching status, consult the predefined problem type list.
- Propose new types when necessary, ensuring they are general enough.
- Use the
errors
field to describe multiple errors.
[DEPRECATED] Subtype/extraType Design
Note: This section is historical. The use of an
extraType
field is now discouraged. All problem classification should be done via thetype
URI, using hierarchical or descriptive paths as needed.
Previously, it was considered to introduce an extraType
field for more granular subtypes. The recommended practice now is to encode all specificity into the type
URI, for example:
json
{
"type": "https://example.com/problems/authentication-error/user-not-found",
"title": "Authentication Error",
"status": 409,
"detail": "Your session has expired due to JWT",
"errors": []
}
Do not use extraType
. Always use a descriptive type
URI to represent all levels of problem classification.
RFC 9457 Compliance Guidelines
- Problem types MUST be general, not product-specific.
- SHOULD maximize reuse of existing problem types.
- Use
about:blank
when HTTP status codes are sufficient. Refer to ADP-402. - Refer to ADP-406 for more examples of types.
References
Changelog
2025.05.09
: Remove product specific type design