Python SDK · Errors
The recorder package exports three error classes:
HTTPError. Non-2xx from the ingestion endpoint. Checkstatus_code,body, andtransient()(5xx + 429 are flagged for retry).BufferFullError. Overflow whenoverflow="error".DrainTimeoutError.close()exceededdrain_timeoutwith pending events.
from everscribe.recorder import HTTPError
try:
rec.flush()
except HTTPError as err:
if err.transient():
... # 5xx / 429 — safe to retry
Minter calls raise a plain ValueError on client-side validation failures (invalid tenant_id, malformed wildcard, out-of-range expires_in) before any HTTP call is made, MinterError (with status_code / body) on HTTP 400/401/404, or a transport error (urllib.error.URLError, socket.timeout) on network failure.