Errors
Handle rooom API errors effectively. Understand HTTP status codes, error responses, and troubleshooting for 2xx, 4xx, and 5xx responses.
Status Codes
These codes are consistent across all endpoints.
200 OK
The request completed successfully.
201 Created
A new resource was created. For example, creating a new space or viewer returns this status.
400 Bad Request
Input parameters are invalid or missing for the endpoint.
{
"error": {
"code": "bad_request",
"message": "Bad request"
}
}401 Unauthorized
Authentication failed, usually due to a missing or invalid API key.
{
"error": {
"code": "unauthorized",
"message": "Not authorized"
}
}402 Payment Required
Insufficient funds in the account associated with the provided API key.
404 Not Found
The requested resource does not exist. For example, providing an invalid ID when retrieving a resource.
429 Too Many Requests
Rate limit exceeded. See the rate limiting documentation for details.
500 Internal Server Error
The request reached rooom, but the service could not complete it because of an unexpected server-side problem.
- Retry the request once after a short delay.
- If the same request keeps failing, record the endpoint, timestamp, and request payload if possible before contacting support.
502 Bad Gateway
The upstream service handling the request returned an invalid response.
- Retry after a short delay, because this is usually temporary.
- If retries continue to fail, check whether the issue affects one endpoint or all traffic and share that scope with support.
503 Service Unavailable
The service is temporarily unavailable, for example during overload or maintenance.
- Wait briefly and retry with backoff.
- Avoid sending the same request in a tight loop while the service is unavailable.
504 Gateway Timeout
The request timed out before the upstream service returned a response.
- Retry the request after a short delay.
- If the request is expensive or processes large payloads, reduce its scope when possible and try again.