Error handling
Handle stable error codes and validation failures.
Every failure uses the same envelope. Branch on error.code, which is stable; error.message is intended for humans and may change.
{
"ok": false,
"error": {
"code": "NOT_FOUND",
"message": "The requested workspace was not found."
}
}Common errors
| Code | HTTP status | What to do |
|---|---|---|
UNAUTHORIZED | 401 | Check that the token is present, valid, and not revoked. |
SCOPE_REQUIRED | 403 | Add the required scope or use a token with the correct access. |
NOT_FOUND | 404 | Check the workspace, site, or backlink filters. |
VALIDATION_ERROR | 422 | Correct the request parameter or body. |
SETUP_REQUIRED | 422 | Configure the required RanklyBee resource before retrying. |
OPERATION_FAILED | 422 | The requested write operation could not be completed. |
RATE_LIMIT_EXCEEDED | 429 | Wait for Retry-After before retrying. |