TLDR RFC 7807 Problem Details for HTTP APIs by E. Nottingham from Akamai

Standardized “problem detail” JSON HTTP response to avoid the need to define new error response formats for HTTP APIs.

Eduard Gomoliako
some-tech-tldrs
1 min readNov 16, 2016

--

The data model for problem details is a JSON doc (“application/problem+json” media type). Also XML format is possible

An example:

  1. A type URI with human-readable documentation for the problem type. This is the only required field.
  2. A title that appropriately describes it (think short), SHOULD NOT change from occurrence to occurrence.
  3. the HTTP status code for it to be used with.
  4. A detail string — with human-readable explanation specific to this
    occurrence of the problem.
  5. An instance string — a URI reference that identifies the specific
    occurrence of the problem.
  6. Response could be extended to clarify problem better. E.g. balance and account fields in the example.

Problem details are intended to avoid the necessity of establishing new “fault” or “error” document formats, not to replace existing domain-specific formats.

For some of you guys it would be nice to hear that technology team from Zalando has in their Github working implementation of RFC 7807 and even with a Spring integration. Cheers to them!

Hit the 👏🏻 and share if you find it useful.

Thanks for reading.

--

--

Eduard Gomoliako
some-tech-tldrs

Software Engineer, Automation Enthusiast, and a Father of Two