Skip to main content
The OneCLI API uses standard HTTP status codes to indicate the outcome of a request. Codes in the 2xx range indicate success, 4xx codes indicate a client error, and 5xx codes indicate a server error.

Error response format

Error responses come in two shapes. Route-level validation errors return a flat error string:
For validation errors, the message is the first issue reported by the validator. Authentication failures and service errors use an envelope with a message and a type:
Handle both: read error when it is a string, otherwise error.message.

Error reference

Common error messages

General

Agents

Secrets

Policy rules

Apps

User

Retry guidance

Most 4xx errors are not retryable. They indicate a problem with the request that must be fixed before retrying. For 500 errors, retry with exponential backoff: