instanceof. All extend UnitPayError.
Usage
Error types
HttpError
A non-2xx response. Carries status, code, requestId, and details, plus convenience getters:
true for 401 / 403.true for 429.true for 408 / 429 / 5xx. The client retries these automatically with jittered exponential backoff.NetworkError
A failed fetch — offline, DNS, or TLS error. Carries the underlying cause.
TimeoutError
The request exceeded the configured timeout.
PmInUseError
Thrown by usePaymentMethods().detach() when the card is still in use. Carries activeSubscriptionIds and autoTopupAccountIds so you can tell the customer what’s blocking removal — pair it with usePaymentMethodDependencies to show the blockers before they try.
Transient failures (
408 / 429 / 5xx and network errors) are retried automatically with
jittered exponential backoff. Retry budget and per-request timeout are configurable on the client.