RFC 9457 standardizes Problem Details for HTTP APIs: an error-response format that communicates machine-readable and human-readable information. It uses application/problem+json so consumers can identify the format precisely, while allowing custom properties for domain-specific needs. section 9.8.6
A problem detail commonly distinguishes:
- status, the returned HTTP status; section 9.8.6
- type, identifying the problem and optionally linking to further information; section 9.8.6
- title and detail, providing stable and occurrence-specific human-readable explanations; section 9.8.6
- custom properties such as an errors list for validation or business-rule failures. section 9.11 section 9.8.6
Money transfer and unexpected server errors
A money-transfer operation can return a Problem Details response with an errors list whose entries use detail and type consistently with the standard. For an unexpected failure, return a generic message and optionally use instance, such as /unexpected-errors/12345, to correlate the response with server investigation without exposing database, network, or programming-language details. section 9.8.6 section 12.10.3
Figure 9.15 An error response for the “Money transfer” operation using and customizing the “Problem Details for HTTP APIs” standard
Inspect the money-transfer response example to see standard properties combined with a custom errors list. section 9.8.6
