ProClubsError and expose a typed code.
Catch errors by class
ProClubsHttpError adds the rejected status, internal endpoint, optional
retryAfterMs, and an optional sanitized body excerpt limited to 200 characters.
ProClubsResponseError adds the internal endpoint. Original errors are
available through cause where applicable.
Retry policy
The SDK retries:- network failures and timeouts;
429,502,503, and504responses;403responses only when the body does not validate as the requested endpoint’s expected payload, in the default HTTP mode.
baseDelayMs. If EA returns Retry-After
with a longer delay, that value wins. The total number of attempts is bounded by
maxAttempts, from 1 through 5.
EA has been observed returning valid payloads with status
403. The SDK
accepts such a response only when its body validates for that exact endpoint.
A body such as { "error": "Forbidden" } is never treated as valid data.Stop on every 403
SethttpMode: 'strict' when a probe or consumer must stop on a 403 regardless
of its payload:
ProClubsHttpError, even
when maxAttempts is greater than 1. The error includes status: 403 and the
typed endpoint. The request emits request:error with code HTTP and status
403, without request:success or request:retry for that attempt. Other
statuses keep their existing retry behavior. Strict mode releases the response
without parsing its payload, so bodySnippet is unavailable for that error.
It does not change a value already served from the optional cache; use
{ cache: 'bypass' } when every call must reach the transport.
The SDK does not retry:
- local validation failures;
- caller aborts;
- a
2xxresponse containing invalid JSON or an unexpected payload; - non-retryable HTTP statuses.