content/guides/04.connect/5.errors.md
Below are the global error codes used within Directus, and what they mean.
| Error Code | Status | Description |
|---|---|---|
FAILED_VALIDATION | 400 | Validation for this particular item failed. |
FORBIDDEN | 403 | You are not allowed to do the current action. |
INVALID_TOKEN | 403 | Provided token is invalid. |
TOKEN_EXPIRED | 401 | Provided token is valid but has expired. |
INVALID_CREDENTIALS | 401 | Username / password or access token is wrong. |
INVALID_IP | 401 | Your IP address isn't allow-listed to be used with this user. |
INVALID_OTP | 401 | Incorrect OTP was provided. |
INVALID_PAYLOAD | 400 | Provided payload is invalid. |
INVALID_QUERY | 400 | The requested query parameters can not be used. |
UNSUPPORTED_MEDIA_TYPE | 415 | Provided payload format or Content-Type header is unsupported. |
REQUESTS_EXCEEDED | 429 | You have exceeded the rate limit. |
ROUTE_NOT_FOUND | 404 | Endpoint does not exist. |
SERVICE_UNAVAILABLE | 503 | Could not use external service. |
UNPROCESSABLE_CONTENT | 422 | You tried doing something illegal. |
To prevent revealing which items exist, all actions for non-existing items will return a FORBIDDEN error.