Documentation

Errors

Every failure uses the same envelope, and every class has a page.

The envelope

Errors are RFC 9457 problem documents, served as application/problem+json.

{
  "type": "https://fentlig.se/developers/errors/notice-not-found",
  "title": "Notice not found",
  "status": 404,
  "detail": "No notice matches the identifier 'f4161f6d'.",
  "instance": "/v1/notices/f4161f6d",
  "code": "NOTICE_NOT_FOUND"
}
  • code is what to branch on. It is stable for the life of /v1.
  • type resolves to the page below explaining that class.
  • detail describes this occurrence, in English. Show it to a developer, not to an end user.
  • title is a fixed, human-readable name for the class. Branch on code instead.

Classes