Skip to content

Error Handling

All API errors return a JSON body with an error field describing the problem.

Response Format

json
{
  "error": "description of the error"
}

Status Codes

CodeMeaningWhen it occurs
400 Bad RequestMalformed request body or invalid parametersJSON parse failure, missing required fields, invalid query parameter values
401 UnauthorizedMissing or invalid API keyRequest without Authorization header or with an incorrect API key
404 Not FoundThe requested resource does not existUnknown collection name, unknown item ID, unmatched route
500 Internal Server ErrorUnexpected server-side failureStorage errors, internal bugs, resource exhaustion

Examples

Collection not found

GET /collections/unknown/search?q=test
json
{
  "error": "collection `unknown` not found"
}

Invalid request body

POST /collections
Content-Type: application/json

{"name": "mycol"}
json
{
  "error": "missing field `id_type`"
}

Unmatched route

GET /nonexistent
json
{
  "error": "not found"
}