Error codes
All errors use standard HTTP status codes with a JSONdetail body. The shape of
detail varies by endpoint, but most authenticated endpoints use a structured
object.
Error shape
detail includes additional context:
Status codes
Structured detail.error values
The detail.error field is a machine-readable code you can branch on.
Retrying
429rate limited — back off and retry. Check theRetry-Afterheader if present, otherwise wait ~1s and retry with exponential backoff.500/504— safe to retry with exponential backoff. The scrape engine already retries internally up to 3 times before surfacing these.400— do not blindly retry; fix the request. The exception isconnection_failedon a transient network error.401— fix authentication; retrying won’t help.
Request IDs
Every response includes anX-Request-ID header. Pass your own X-Request-ID on the
request to correlate logs, or read the server-generated one from the response.