Status Code Behavior
| Status Code | Orceum Behavior |
|---|---|
200 | Success — result returned to the assistant |
401 | Trigger token refresh (OAuth) or prompt re-auth, then retry once |
429 | Retry with backoff, up to 3 attempts |
| Any other error | Mark call as failed, surface error message to user |
Error Response Format
When returning a non-200 status, include a JSON body with adetail field:
401 — Unauthorized
The401 flow is handled automatically by Orceum:
OAuth: attempt token refresh
If the app uses OAuth, Orceum attempts to refresh the access token using the stored refresh token.
Retry the request
If refresh succeeds, Orceum retries the exact same request once with the new token.
If refresh fails → REAUTH_REQUIRED
The installation status is set to
REAUTH_REQUIRED. Orceum notifies the user with a re-authentication link.Orceum only retries once after a 401. If the second attempt also returns 401, it marks the installation as
REAUTH_REQUIRED and stops.429 — Rate Limited
When Orceum receives a429 from your app:
- Waits a short backoff interval
- Retries the request
- Retries up to 3 times total
- If all 3 attempts return
429, the call is marked as failed and the user is informed
Retry-After headers if your service uses them — Orceum will honor them.
500+ — Server Errors
Server errors (5xx) are not retried. Orceum immediately marks the call as failed and returns an error to the user:
Validation Errors
If the assistant sends parameters your app rejects, return400 with a descriptive message: