Problem Details

A standard JSON shape for HTTP error responses, defined in RFC 9457, with members such as type, title, status, detail and instance.

In more detail

It is defined by RFC 9457 (July 2023), which obsoletes the original RFC 7807; responses written for 7807 are still valid. Its media type is application/problem+json. Type is a stable identifier clients can branch on (about:blank when nothing more specific applies), title is a short human label, status repeats the HTTP status, detail explains this occurrence safely, and instance can identify the occurrence. Extra members are allowed but must be documented and must not clash with the standard names.

Examples

{"type":"about:blank","title":"Not Found","status":404,"detail":"No task 999"}
{ "type": "https://api.acme.com/errors/http-404", "title": "Not Found", "status": 404, "detail": "User account missing", "instance": "/users/u10" }
Spring: ProblemDetail.forStatusAndDetail(404, error.getMessage())

Related terms

Taught in

References