When a request fails, the API returns an HTTP status code and a JSON body that explains why.
{
"success": false,
"message": "Requested Resource Not Found!",
"errorCode": 404,
"errors": ["Task with taskId 123 not found!"]
}
| Field | Description |
|---|
success | Always false for errors |
message | A short summary of the problem |
errorCode | A numeric code for the kind of error |
errors | Details, such as which item was not found or which fields failed validation |
Status codes#
| Status | Meaning |
|---|
400 | The request is invalid, a required header is missing, or the workspace's subscription does not allow the request |
401 | The access token is missing, invalid or expired |
403 | The user is not allowed to do this, or the workspace's plan does not include the feature |
404 | The resource does not exist or the user cannot see it |
406 | The resource already exists |
422 | The request could not be processed |
500 | Something went wrong on our side |
Common error codes#
errorCode | Meaning |
|---|
600 | A field failed validation |
601 | A value has the wrong type |
603 | The uploaded file is too large |
604 | A value has an invalid format |
608 | The resource already exists |
609 | The storage limit is exceeded |
7xx | The workspace's subscription is not active |
Subscription errors#
If the workspace's subscription is not active, requests are refused with HTTP 400 and an errorCode in the 7xx range. Show the message to your user: it says what to do next.Subscription errors are resolved in Astravue by whoever manages the workspace's subscription, not through the API.