Error Responses
When an error occurs, the Nabto Cloud API returns a response with status code 400 or above. All error responses contains a JSON formatted body detailing the error. This can be used to destinquish different errors with the same status code.
The error object is uses the following format:
{
error: {
type: string,
message: string
}
}
The type string is a static string suitable for programatical handling. The message string is a human readable string detailing the error.
Error types
| Status code | error type | description |
|---|---|---|
| 400 | invalid_request_error | A parameter in the request was not properly formatted |
| 400 | syntax_error | There was a syntax error in the request |
| 400 | validation_error | A parameter did not use a valid format |
| 401 | authentication_error | The provided API Key was not valid |
| 401 | mfa_required_error | The API key must be MFA authorized |
| 403 | forbidden | The API key does not have access to the requested ressource |
| 403 | organization_quota_exceeded | The Organization reached its limit of the ressource |
| 403 | organization_owner_removal | Removal of the organization owner was requested |
| 403 | device_quota_exceeded | The max number of devices allowed for the ressource has been reached. |
| 403 | access_denied_insufficient_permissions | The API key does not have sufficient persmissions to perform the request |
| 404 | invalid_request_error | The requested ressource does not exist |
| 409 | invalid_request_error | The ressource already exist |
| 500 | api_error | An internal error happend in the API backend |