Skip to content
docs

parseAcrossV5Error

parseAcrossV5Error(status, body, retryAfter?, nowMs?): AcrossV5Error

Defined in: protocol-swap2-across/src/api.ts:395

Read a non-2xx V5 answer: the two envelopes Across uses — flat {code, message, details} (the gateway’s 401) and nested {error: {type, code, message, param, requestId, details}} — and its CS-13 classification. A 429 is rate_limited with its Retry-After first; then the code (with details.amountLimits.side for policy.amount_out_of_range); then the status (401 / 403 → key_rejected, 408 / 425 / 5xx → upstream_unavailable); a JSON refusal neither names is a quote the API does not have (no_route).

number

unknown

string | null

number = ...

AcrossV5Error