Python SDK · Errors

The recorder package exports three error classes:

  • HTTPError. Non-2xx from the ingestion endpoint. Check status_code, body, and transient() (5xx + 429 are flagged for retry).
  • BufferFullError. Overflow when overflow="error".
  • DrainTimeoutError. close() exceeded drain_timeout with 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.