When calling the /quote/v2 endpoint, various errors may be returned depending on request conditions, user input, or internal routing logic. This guide outlines the possible error codes, their meanings, and how to handle them.
Looking for errors that occur after a request is submitted? See
Handling Execution Errors for fill and refund failure reasons.
Expected Errors
These are known validation and routing issues that developers should gracefully handle in their integrations:
PRICE_FETCH_FAILED, REQUEST_TIMED_OUT, RPC_HTTP_ERROR, and SERVICE_UNAVAILABLE all indicate transient upstream infrastructure issues, not problems with your request. PRICE_FETCH_FAILED and SERVICE_UNAVAILABLE are returned with HTTP 503; REQUEST_TIMED_OUT and RPC_HTTP_ERROR are returned when upstream RPCs are classified as transient. Retry with backoff before surfacing a failure to the user.
Overriding Price Impact Protection
Relay rejects a quote with SWAP_IMPACT_TOO_HIGH when the swap’s price impact exceeds its protection threshold. The guard protects users from receiving far less than the reference value of their input, but it also blocks swaps where high impact is genuine and expected — most commonly newly launched or thin-liquidity tokens.
To accept the impact and receive the quote anyway, pass overridePriceImpact in the quote request:
With the override enabled, the quoted output can be far below the reference value of the input. Surface details.totalImpact from the quote response in your UI and require explicit user confirmation before execution. The override only bypasses the impact check — it does not help when no route is returned at all (NO_SWAP_ROUTES_FOUND).
Unexpected Errors
These indicate infrastructure or downstream failures and are not common:
Example Error Responses
Invalid Input Currency
No Routes Found
Destination Transaction Failed
Solana Transaction Too Large