SkyvernError and include the HTTP status code, response body, and raw response.
Error types
| Exception | Status Code | When it’s raised |
|---|---|---|
BadRequestError | 400 | Invalid request parameters. |
ForbiddenError | 403 | Invalid or missing API key. |
NotFoundError | 404 | Resource (run, workflow, session) not found. |
ConflictError | 409 | Resource conflict (e.g., duplicate creation). |
UnprocessableEntityError | 422 | Request validation failed. |
SkyvernError | Any | Base class for all API errors. Catch this as a fallback. |
SkyvernTimeoutError | — | HTTP request timed out. |
Catching errors
Error properties
Every error has these attributes:| Property | Type | Description |
|---|---|---|
statusCode | number | undefined | HTTP status code. |
body | unknown | Response body (usually an object with error details). |
rawResponse | RawResponse | undefined | The raw HTTP response. |
message | string | Human-readable error message. |
Timeouts
Two different timeouts apply:HTTP request timeout
Controls how long the SDK waits for the HTTP response from the Skyvern API. Set it in the constructor or per-request:SkyvernTimeoutError is thrown.
Completion timeout
Controls how longwaitForCompletion polls before giving up. This is separate from the HTTP timeout:
Error with a timeout message.
Retries
Configure automatic retries for transient failures. Set it in the constructor or per-request:getRun to check the status and re-run if needed.
Abort requests
Cancel in-flight requests usingAbortSignal:
Run failure vs API errors
There are two distinct failure modes: API error — The HTTP request itself failed. The SDK throws an exception.status field:
Run statuses
| Status | Description |
|---|---|
created | Run initialized, not yet queued. |
queued | Waiting for an available browser. |
running | AI is executing. |
completed | Finished successfully. |
failed | Encountered an error during execution. |
terminated | Manually stopped. |
timed_out | Exceeded step limit (max_steps). |
canceled | Canceled before starting. |

