Skip to main content

Catch SDK errors

code describes the SDK error category. backendCode retains the API error code for diagnostics.

Retry reads and writes differently

The SDK retries transient GET errors. A failed GET can be repeated without a new launch or submission. A network error or timeout after a write has an unknown outcome. The server can finish the action before the response fails. Do not automatically repeat launches after unknown outcomes. Retain the deployment ID from successful launches and reconcile your application state. Repeated completion responses require deduplication in your application. The completion guide explains them.

Rate limits

If the error is rate_limited, show the retryAfter wait in your interface. The value is in seconds. If the error is concurrency_limited, show that the organization has no free deployment slots. Repeated launch requests do not release slots.

Terminal startup

createTerminalSession() retries CONTAINER_STARTING within its startup deadline. Other terminal failures return to your application. An ended or disabled terminal requires a different action, not an automatic reconnect loop.

Browser responses

Return only the fields your interface requires:
Keep raw causes and diagnostic fields on the server. Logs must not contain API keys, lab outputs, or terminal credentials. See the error reference for categories.