Errors

JSON Errors

JSON input that cannot be parsed, results in a 400 response. No more information is provided with the response, so make sure your JSON is formatted properly!

{
    "id": "bad_request",
    "message": {"error": "Malformed JSON"}
}

Authorization Errors

For some endpoints, an authorized session is required. Authorized sessions are obtained by logging in through the browser. Accessing user-specific endpoints like GET /api/account without an authorized session will result in the following error:

{
    "id": "requires_login",
    "message": "Requires login"
}

Validation Errors

JSON input data for POST and PUT endpoints are validated prior to handling the request.

Validation errors will result in a 400 response with a JSON body with the following parameters:

ParameterDescription
locThe parameter which generated the error
msgA Human-readable description of the error
typeThe type of error returned
inThe section of the request which triggered the validation error

For example, if a request was made that excludes a required parameter name from the request’s body the following response will be sent:

[
  {
    "loc": ["name"],
    "msg": "field required",
    "type": "value_error.missing",
    "in": "body"
  }
]

For the case where more than one parameter validation fails, there will be an equivalent number of entries in the list.