Skip to content
View as Markdown
class BuildLogInterruptedError(DaytonaError)

Observation failed; cursor is the last successfully delivered checkpoint.

A callback failure is never retried. Its cause may have partially applied application effects; persist output and cursor together before resuming.

def __init__(message: str,
*,
cursor: str | None = None,
code: str = 'BUILD_LOG_INTERRUPTED',
status_code: int | None = None) -> None
class DaytonaError(_shared.DaytonaError)

Base class for all SDK errors.

def __init__(message: str,
*,
status_code: Optional[int] = None,
code: Optional[str] = None,
source: Optional[str] = None,
details: Optional[ErrorDetails] = None) -> None
class BadRequestError(DaytonaError, _shared.DaytonaBadRequestError)

HTTP 400.

class UnauthorizedError(DaytonaError, _shared.DaytonaAuthenticationError)

HTTP 401.

class ForbiddenError(DaytonaError, _shared.DaytonaForbiddenError)

HTTP 403.

class NotFoundError(DaytonaError, _shared.DaytonaNotFoundError)

HTTP 404.

class RequestTimeoutError(DaytonaError, _shared.DaytonaTimeoutError)

HTTP 408.

class SandboxCreateTimeoutError(RequestTimeoutError)

create() ran out of caller budget while the sandbox was still starting.

The sandbox was created and is left running; sandbox_id lets the caller pick it up (d.v2.get(sandbox_id)) or delete it.

def __init__(sandbox_id: str) -> None
class DockerWaitTimeoutError(RequestTimeoutError)

sandbox.docker.wait_until_ready() ran out of caller budget before Docker was ready.

status is the last observed Docker status (starting, or deferred while the boot has not started Docker yet), or None when no status answer arrived before the deadline (for example a stalled first request).

def __init__(status: Optional[DockerStatus]) -> None
class ConflictError(DaytonaError, _shared.DaytonaConflictError)

HTTP 409.

class DockerNotReadyError(ConflictError)

sandbox.docker.wait_until_ready() saw Docker settle in a state that cannot become ready.

The terminal states are failed, not_present, disabled, unmanaged, unsupported, and deferred with reason function-ready-template. status is the observed Docker status; its reason says why, and process_id (when set) names the process whose logs hold Docker’s output. The sandbox itself stays usable.

def __init__(status: DockerStatus) -> None
class SandboxTerminalStateError(ConflictError)

wait_for_state() saw the sandbox reach a terminal state before any target.

state is the observed public sandbox state (e.g. "destroyed").

def __init__(sandbox_id: str,
state: SandboxState,
*,
raw_state: Optional[str] = None) -> None
class PreconditionFailedError(DaytonaError)

HTTP 412 — the If-Match revision no longer matches (network policy CAS).

class SecretAlreadyExistsError(PreconditionFailedError)

A create-only secret write found an existing secret.

class GoneError(DaytonaError, _shared.DaytonaGoneError)

HTTP 410.

class MethodNotAllowedError(DaytonaError)

HTTP 405.

class PayloadTooLargeError(DaytonaError)

HTTP 413.

class UnsupportedMediaTypeError(DaytonaError)

HTTP 415.

class UnprocessableEntityError(DaytonaError, _shared.DaytonaUnprocessableEntityError)

HTTP 422.

class RateLimitError(DaytonaError, _shared.DaytonaRateLimitError)

HTTP 429.

class LimitExceededError(RateLimitError)

LIMIT_EXCEEDED (429): an organization limit is exhausted.

Subclasses RateLimitError, so except RateLimitError keeps matching; limit is the limit’s stable machine name (e.g. max_concurrent_vms) and current/max are the counts the refusal was computed from. Attributes are None when a body omits or malforms them.

class PreconditionRequiredError(DaytonaError)
class ServiceUnavailableError(DaytonaError, _shared.DaytonaServiceUnavailableError)

HTTP 503.

class InternalServerError(DaytonaError, _shared.DaytonaInternalServerError)

HTTP 5xx.

class NotSupportedError(InternalServerError)
class ConnectionError(DaytonaError, _shared.DaytonaConnectionError)

Network connection failure.

class ClientTimeoutError(DaytonaError, _shared.DaytonaTimeoutError)

Client-side transport timeout.

class TransferCancelledError(DaytonaError)

A local file transfer was cancelled before completion.

class SandboxCreateRequestTimeoutError(ClientTimeoutError)

The create() request itself timed out before the server answered.

The server may still have created the sandbox. idempotency_key is the key the request was sent with. Retry with that key and the identical source and create arguments, in the same project and coordinator or cell, to recover the sandbox (or create it if the first request never landed). New records reject changed requests; historical mappings without a request digest may replay the original without detecting changes.

def __init__(idempotency_key: str) -> None
class SandboxCreateConnectionError(ConnectionError)

The connection failed while the create() request was in flight.

Same outcome as SandboxCreateRequestTimeoutError: the sandbox may or may not exist; retry create() with the same idempotency_key, source and create arguments, in the same project and coordinator or cell.

def __init__(idempotency_key: str, detail: str) -> None
class ProcessNotFoundError(NotFoundError)

PROCESS_NOT_FOUND.

class ProcessStartFailedError(BadRequestError)

PROCESS_START_FAILED.

class ProcessTerminalError(ConflictError)

PROCESS_TERMINAL.

class ProcessExecutionTimeoutError(RequestTimeoutError)

PROCESS_EXECUTION_TIMEOUT.

class NameConflictError(ConflictError)

NAME_CONFLICT.

class InvalidCursorError(BadRequestError)

INVALID_CURSOR.

class CursorExpiredError(ConflictError)

CURSOR_EXPIRED.

class StdinClosedError(ConflictError)

STDIN_CLOSED.

class StdinUnavailableError(ConflictError)

STDIN_UNAVAILABLE.

class ProtectedProcessError(ForbiddenError)

PROTECTED_PROCESS.

class UnsupportedOperationError(BadRequestError)

UNSUPPORTED_OPERATION.

class SessionNotFoundError(NotFoundError)

SESSION_NOT_FOUND.

class SessionEndedError(GoneError)

SESSION_ENDED.

class KernelUnavailableError(ServiceUnavailableError)

KERNEL_UNAVAILABLE.

class LspServerUnavailableError(ServiceUnavailableError)

LSP_SERVER_UNAVAILABLE.

class LspNotStartedError(ConflictError)

LSP_NOT_STARTED.

class AddonUnavailableError(ServiceUnavailableError)

ADDON_UNAVAILABLE.

class FileNotFoundError(NotFoundError)

FILE_NOT_FOUND.

class InvalidFilePathError(BadRequestError)

INVALID_FILE_PATH.

class FileAccessDeniedError(ForbiddenError)

FILE_ACCESS_DENIED.

class FileReadFailedError(InternalServerError)

FILE_READ_FAILED.

class GitAuthFailedError(UnauthorizedError)

GIT_AUTH_FAILED.

class GitRepoNotFoundError(NotFoundError)

GIT_REPO_NOT_FOUND.

class GitBranchNotFoundError(NotFoundError)

GIT_BRANCH_NOT_FOUND.

class GitBranchExistsError(ConflictError)

GIT_BRANCH_EXISTS.

class DesktopNotReadyError(ConflictError)

DESKTOP_NOT_READY.

class FsFreezeUnsupportedError(ConflictError)

FS_FREEZE_UNSUPPORTED (runner-only control route).

class NoDefaultGatewayError(ServiceUnavailableError)

NO_DEFAULT_GATEWAY (runner-only control route; retry).

class AtomicUploadUnsupportedError(ConflictError)

ATOMIC_UPLOAD_UNSUPPORTED.

class OrgSuspendedError(DaytonaError)
class ProjectBudgetExceededError(DaytonaError)

PROJECT_BUDGET_EXCEEDED (402): the project reached its monthly budget.

New sandboxes cannot start in the project until the budget is raised or removed, or the next calendar month (UTC) begins.

class RateLimitedError(RateLimitError)
class OverloadedError(RateLimitError)
class NotSupportedForClassError(ConflictError)
class FeatureNotEnabledError(ForbiddenError)
class UnsupportedVolumeTypeError(BadRequestError)
class BucketCreateFailedError(InternalServerError)
class BucketDeleteFailedError(InternalServerError)
class BucketNotEmptyError(ConflictError)
class OriginImportOnlyError(BadRequestError)
class ReadOnlyUnsupportedError(BadRequestError)
class BillingDisabledError(NotSupportedError)
class BillingUnreachableError(InternalServerError)
class BillingUnavailableError(ServiceUnavailableError)
class BillingNotProvisionedError(ConflictError)
class ChargeNotFoundError(NotFoundError)
class InvoiceNotFoundError(NotFoundError)
class CouponNotFoundError(NotFoundError)
class CouponExpiredError(ConflictError)
class CouponLimitReachedError(ConflictError)
class CouponAlreadyRedeemedError(ConflictError)
class InvoiceNotFinalizedError(ConflictError)
class InvoiceNotPayableError(ConflictError)
class ChargeNotSucceededError(ConflictError)
class PlanUnchangedError(ConflictError)
class PlanChangePendingError(ConflictError)
class PlanManagedByOperatorError(ConflictError)
class PaymentMethodRequiredError(ConflictError)
class BillingAccountConflictError(ConflictError)
class UnknownPlanError(BadRequestError)
class PlanRequiresSalesError(BadRequestError)
class AutomaticTopUpNotAvailableError(ConflictError)
class SearchNotConfiguredError(NotSupportedError)
class SearchUnavailableError(ServiceUnavailableError)
class SandboxWakingError(ServiceUnavailableError)
class SandboxNotRunningError(ConflictError)
class SandboxStartFailedError(ConflictError)
class ImageNotFoundError(NotFoundError)
class ImageNotReadyError(ConflictError)
class ImageFormatOutdatedError(ConflictError)

IMAGE_FORMAT_OUTDATED (409): the image is stored in an older format than the current one (Image.format_outdated) and this door cannot convert it. Convert it with POST /images/{id}/convert, or create a Linux sandbox from it, which converts it first.

class ImageBuildFailedError(ConflictError)

IMAGE_BUILD_FAILED (409), or the SDK-minted refusal when create_from_build()’s image build ends failed. image_id names the failed image (so its build log can be fetched) when the SDK knows it; build_error is the build’s recorded error, when any.

def __init__(message: str,
*,
status_code: Optional[int] = None,
code: Optional[str] = None,
source: Optional[str] = None,
details: Optional[ErrorDetails] = None,
image_id: Optional[str] = None,
build_error: Optional[str] = None) -> None
class ImageClassMismatchError(ConflictError)
class ImageNameTakenError(ConflictError)
class ImageNameReservedError(BadRequestError)
class IdleOutOfRangeError(BadRequestError)
class CreateTtlOutOfRangeError(BadRequestError)
class SnapshotNotFoundError(NotFoundError)
class SnapshotNotReadyError(ConflictError)
class SnapshotClassMismatchError(ConflictError)
DaytonaValidationError = BadRequestError
DaytonaAuthenticationError = UnauthorizedError
DaytonaAuthorizationError = ForbiddenError
DaytonaNotFoundError = NotFoundError
DaytonaConflictError = ConflictError
DaytonaRateLimitError = RateLimitError
DaytonaTimeoutError = ClientTimeoutError
DaytonaConnectionError = ConnectionError
DaytonaNotSupportedError = NotSupportedError