Skip to content

Errors

Source: leap0/models/errors.py

Extends Exception.

Base error for the Leap0 SDK.

Every SDK exception carries optional HTTP context so callers can inspect the original response without parsing strings.

Attributes: message: Human-readable error description. status_code: HTTP status code, if the error originated from an API response. headers: Response headers from the API, if available. error_message: Parsed message field from a JSON response body, if present.

Extends Leap0Error.

The requested resource does not exist (HTTP 404).

Raised when a sandbox, file, directory, PTY session, LSP server, SSH access, or other resource cannot be found.

Extends Leap0Error.

Permission denied for the requested operation (HTTP 403).

Raised when the sandbox filesystem denies access due to file permissions or ownership.

Extends Leap0Error.

The operation conflicts with the current resource state (HTTP 409).

Raised when a resource already exists (e.g. mkdir on an existing directory), or when there are too many active sessions.

Extends Leap0Error.

Rate limit exceeded (HTTP 429).

Callers should back off and retry after the interval indicated by the Retry-After header, if present.

Extends Leap0Error.

The operation timed out.

Raised when a sandbox operation or API call exceeds its deadline.

Extends Leap0Error.

A WebSocket connection to a sandbox failed.