Use Celesto 0.1.7 or later for the structured fields below:The
Catch cloud errors
handle_errors.py
with block deletes the computer when it exits. A nonzero command exit
code is a CommandResult, so check result.exit_code. If your code and deletion
both fail, Python raises an exception group containing both failures.Missing credentials and invalid local arguments can raise
ValueError before a
request is sent. Set CELESTO_API_KEY, pass api_key=, or run
celesto auth login to supply credentials.Choose the next action
Read the message first. Usecode to distinguish failures that share an HTTP
status, especially HTTP 429:Handle an uncertain outcome
A timeout or unreadable response can happen after the server accepts a request. The SDK does not automatically repeat state-changing requests.- Create: inspect your computers in the dashboard before
creating another.
idempotency_keyis a support reference for reconciling that request; the public constructor does not accept it to replay creation. - Run a command: check the command’s intended result before running it again. A computer’s running state cannot establish whether the command executed.
- Stop or resume: inspect that computer’s state before retrying the same operation. Stopping preserves files; deleting removes the computer.
- Delete: inspect whether that computer still exists before deciding whether to retry deletion on the same handle.
- Publish or remove a port: inspect
computer.published_ports()before repeating the change.
Structured fields
BothCloudAPIError and CloudOperationError expose the common fields below.
Optional references are None when no safe value is available. The final three
fields apply to CloudAPIError only; validation_errors is an empty tuple when
no safe field errors are available. Raw response bodies and connection
credentials are excluded. For supported endpoints, CloudAPIError.details["detail"]
preserves a bounded HTTP 400 explanation for compatibility. Other arbitrary
server diagnostics are excluded.