Internal server errors

Endpoints might return 500: Internal Server Error responses in addition to their usual responses. There are two kinds of internal server error responses: application-error and database-corruption.

An application-error response is a catchall for unexpected errors. The msg of an 500 application-error response contains the underlying error's message and a description of information contained in details. The details contain the error's stack trace (as an array of strings) and might contain schema, value, and error keys if the error was caused by a schema validation failure.

A 500 database-corruption response occurs when a resource that is retrieved from the database fails to conform to the schema expected of it by the application. This usually indicates a software bug, but can indicate either:

  • Genuine corruption in the database
  • That a third party has changed values directly in the database

The msg contains a description of how the database corruption could have occurred. The details contains retrieved, schema, and error keys, which report retrieved resource, the schema it was expected to conform to, and a description of how the resource failed to conform to that schema.