Error handling
Our error responses make debugging easy by using standard HTTP error codes and additional helpful attributes.
Here is an example error response, they will always have this structure:
{
"errors": [
{
"status": "401",
"title": "Invalid token",
"detail": "The token is invalid or has been revoked.",
"code": "INVALID_TOKEN"
}
]
}
Error Attributes
We provide the following attributes as part of every error response:
- status: The HTTP status code
- title: General description of the error
- detail: In depth description of the error
- code: A code specific to the error that you can use to do detailed error handling
List of error codes
code | status | Description |
---|---|---|
INVALID_API_KEY | 401 | The API token you have provided in the x-api-key header is invalid or has been revoked. |
NOT_ADMIN | 401 | You are not an admin of the padlet you are trying to access. |
NOT_FOUND | 404 | The requested resource was not found. |
NOT_PAYING_USER | 403 | You are not a paying user. Only paying users can access the API. |
PADLET_ARCHIVED | 400 | The padlet you are trying to access is archived. Unarchive the padlet to access it with the API. |
RATE_LIMIT_EXCEEDED | 429 | You have exceeded the rate limit. Wait a minute and try again. |
Rate limiting
We rate limit by IP. The limit is 250 requests/minute.
When the rate limit is hit this is the response:
{
"errors": [
{
"status": "429",
"title": "Rate limit exceeded",
"detail": "Too many requests. Please try again in a minute",
"code": "RATE_LIMIT_EXCEEDED"
}
]
}