code, the HTTP status, and a requestId. The requestId comes back in the x-request-id response header — include it in any support report, it’s how we find your exact request in the logs.
Status codes
The error taxonomy is closed: eachcode maps to exactly one HTTP status.
Typed errors in the SDKs
The SDKs resolve every failure into a typed error so you can branch oninstanceof instead of string-matching a code. All of them extend WebhookError, which carries code, status, requestId, and — for a throttle — retryAfterMs.
WebhookAPIError:
Three more errors never come from a server status, so catch them separately:
WebhookConfigError— the client was constructed with bad options (e.g. a plaintext base URL). Thrown eagerly, before any request.WebhookConnectionError— the request never reached the server (DNS, TLS, connection, or a client-side timeout).WebhookUnexpectedResponseError— a response the SDK can’t interpret (an unmodelled status, or a body that failed validation).
WebhookError to handle any SDK failure uniformly; catch a subclass to handle one precisely.