Errors & status codes
You can tell if your request was successful by checking the status code when receiving an API response. If a response comes back unsuccessful, you can use the error type and error message to figure out what has gone wrong.
Magistrate implements basic rate limiting to prevent abuse. These limits can be lifted upon request.
Rate limits
The API is currently limited to 5 requests per minute. If you need more, we'd be happy to increase your limit. Just reach out to support.
Status codes
Here is a list of the status codes returned by the Magistrate API. Use these to understand if a request was successful.
- Name
2xx
- Type
- Description
Your request was processed successfully. If you are expecting data, it will be in the response body.
- Name
400
- Type
- Description
Your request isn't properly given. Response body is a JSON object with additional information.
- Name
401
- Type
- Description
You are not properly authenticated. Did you pass the correct Authorization header?
- Name
403
- Type
- Description
You don't have access to the resource. This could be because your have exceeded your plan quota. See the response body for more details.
- Name
422
- Type
- Description
There was a problem rendering a blueprint. Repeating the request won't help. If this is an official blueprint, Magistrate's support is notified to fix the problem. If the blueprint is user-provided, you will need to correct the error in the blueprint.
- Name
429
- Type
- Description
You are rate limited. Wait a few minutes and try again.
- Name
503
- Type
- Description
Down for maintenance. Try again in an hour.
- Name
5xx
- Type
- Description
A
5xx
status code indicates a server error — something is wrong on our side and we're working on it.
Error response
HTTP/1.1 401 Forbidden
Content-Type: application/json
{
"detail": "You did not pass a valid Authorization token.",
}