topic
Verified 2026-09-18Problem Details for HTTP APIs
Problem Details provides a standard JSON shape for explaining HTTP API errors.
Use application/problem+json with a stable type URI, title, status, detail, and instance as appropriate. Keep detail safe for clients and put field-level validation data in documented extensions.
httpapierrorsjson
Reference (http)
HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json
{"type":"https://api.example.com/problems/invalid-input","title":"Invalid input","status":422,"detail":"The request could not be processed."}Use application/problem+json with a stable type URI, title, status, detail, and instance as appropriate. Keep detail safe for clients and put field-level validation data in documented extensions.
Common mistakes
- Returning stack traces or unstable internal exception names, or changing the meaning of a problem type between releases.
Sources