Skip to main content

Error Handling

The Terros API uses a 200 OK response code on all endpoints. You must parse the JSON body to determine the success or failure of a request.

Error Response

All error responses will include a JSON object with the following structure:

{
"type": "error",
"error": <ERROR TYPE>,
"message": string
}

Error Types

  • Server
  • InvalidRequest
  • NotAuthorized
  • Timeout

You will only receive an HTTP error code in specific circumstances:

  • 401 Unauthorized
  • 403 Forbidden
  • 500 Internal Server Error