The SDK’s own view of this is SDK errors (the HubError class, and adviseError). Three families of codes reach you, all in the same response envelope:
  • EIN, the hub’s own codes, always with HTTP 400;
  • EPX, the gateway’s refusals, with a real HTTP status (400, 401, 403, 404, 413, 429, 502, 503, 504);
  • EMC, the hub’s framework, which checks a request before the hub’s routes see it, with HTTP 400.

The blocks, and when to retry

EIN and EPX codes share the same numbering, so one rule reads both: The TypeScript SDK exposes the rule as HubError.retryable / retryAfterMs. What a retry means per block, and why EIN0052 and a post-forward EIN0050/EIN0081 on POST /order/openfor need more than a retry loop: Handling errors.

Hub codes (EIN)

Codes EIN0011 to EIN0020 belong to hub routes that are not part of the partner API.

Gateway codes (EPX)

The gateway checks every call before the hub sees it. It answers its own refusals in the hub’s envelope, with the real HTTP status and an EPX code in the same blocks as the hub’s codes: the body’s message and the entry’s error_message are the Message column below, there is no error_reference, and the X-Request-Id header names the call. EPX0080 and EPX0082 carry their back-off in error_params[0] (milliseconds) and in a Retry-After header (seconds); EPX0081 in Retry-After only. A refused credential or origin (EPX0001, EPX0002, EPX0008–EPX0010) is in the terminal block, and only an operator can fix it: the SDK marks it HubError.isCredentialRefused, and adviseError routes it to your team, never to the user. Don’t retry it: refused credentials count toward EPX0081. The hub’s rate-limit rules and the gateway’s are side by side on API keys and rate limits.

Framework codes (EMC)

Returned by the hub’s framework before (or around) the hub’s own code. error_reference names the offending request field for the field codes. The framework’s other codes concern what the gateway itself sends to the hub. If one ever reaches you, report it with its request_id.

See also