Use this file to discover all available pages before exploring further.
The SDK raises typed exceptions for API failures, validation issues, and network problems. The taxonomy mirrors the API’s ErrorResponse envelope, with subclasses per HTTP class for ergonomic catching.
Raised before HTTP I/O when a request body fails Pydantic validation, and after a successful response when the response body doesn’t match the expected schema (rare — usually indicates a stale SDK).
Attribute
Type
Description
message
str
What failed validation
errors
list
Pydantic-style error records with loc, msg, type
from devhelm import DevhelmValidationErrortry: client.monitors.create({"type": "HTTP"}) # missing required fieldsexcept DevhelmValidationError as e: for err in e.errors: print(f"{err['loc']}: {err['msg']}")
Wraps httpx network failures (connection refused, DNS, TLS handshake, timeout) so callers don’t need to import httpx. The original exception is on __cause__.
from devhelm import DevhelmTransportErrortry: client.monitors.list()except DevhelmTransportError as e: print(f"Network error: {e}") print(f"Underlying: {e.__cause__!r}")
Don’t retry on DevhelmValidationError, DevhelmAuthError, DevhelmNotFoundError, or DevhelmConflictError — these are deterministic and won’t change without code or config changes.
from devhelm import DevhelmConflictErrortry: lock = client.deploy_lock.acquire({ "lockedBy": "ci-pipeline", "ttlMinutes": 30, })except DevhelmConflictError: current = client.deploy_lock.current() if current: print(f"Lock held by {current.lockedBy} (since {current.acquiredAt})")