DreepError, carrying the HTTP status and the API’s
message. Catch DreepError for everything, or a specific subclass for the cases worth
handling differently — without comparing status codes.
Anything unmapped surfaces as
DreepAPIError with its status intact.
The split matters when you read attributes: DreepAPIError (the API answered) carries
status, code, validation_errors, request_id and the decoded body.
DreepConnectionError and DreepProcessingError never reached a status, so they carry
only message. DreepError is the base of all of them.
Quote
request_id when reporting a problem — it identifies the exact request in the
API’s logs.Validation errors
A 400 carries the offending fields, so you can map them back onto a form:Plan limits
A 402 means the project hit a ceiling — storage, transformations, folders, presets or seats. The metadata tells you which, without parsing the message:Rate limits
What is retried
- GET requests only. Retried twice by default on 429, 5xx and connection failures,
with exponential backoff and jitter, honouring
Retry-After. - Writes are never retried automatically. Retrying an upload could store the file twice and bill it twice; retrying a delete could remove something recreated in between.
dreep logger:
Retrying a write yourself
The two cases worth handling by hand:upload_presigned() already
handles the first case.
Timeouts
JSON calls time out after 30 seconds. Uploads have no default limit, because a large file can legitimately take minutes:DreepTimeoutError, a subclass of DreepConnectionError, so catching the
latter covers both.