Skip to main content
Failed requests return a JSON body with a name, a numeric code, a message, and an HTTP status. cause adds detail when available.
Branch on code or error. msg and cause are for logs and can change.

Request errors

Quote errors

Service errors

Authentication errors

The OMS API gateway rejects requests with a missing or invalid Api-Key before they reach the Cross-chain API. These return HTTP 401 with InvalidCredentials (code 1003). Check that the key is a publishable key and that its mode matches the host. See authentication.

Failed intents

An intent that fails after execution starts does not return an error response. It can reach FAILED, REFUNDED, or ABORTED. Its receipt’s statusReason explains the outcome, such as slippage, a provider failure, or a receipt timeout. See status and history.

In the SDK

SDK functions throw these errors as exceptions. getPrettifiedErrorMessage(error) turns one into a message you can show the customer. See React hooks.