Skip to main content

Error Classes

Go exposes *commet.CommetError and *commet.ValidationError as concrete types — check them with errors.As.

Error Code Reference

Every current API error includes a stable code and a version-matched doc_url such as customer_not_found. The URL returns a dedicated English Markdown reference with handling and retry guidance for the resolved API version. Keep the x-request-id response header when logging or reporting an error. Commet records the same identifier in Platform, allowing the request to be correlated without including credentials or customer data.

Automatic Retries

Failed requests retry with exponential backoff (1s → 2s → 4s, max 8s). Retryable: 408, 429, 500, 502, 503, 504 Rate limits are the exception to the backoff: a 429 is retried only when the response carries a Retry-After header, and the client waits exactly that value (capped at 30s) instead of backing off. A 429 without Retry-After is not retried.

Non-Blocking Usage

Don’t let tracking errors break your app: