Skip to main content
Errors the App Kit SDK throws for Swap are KitError instances, exported from @circle-fin/app-kit. Its structured fields let you branch on the failure type instead of parsing message strings. Errors surface from kit.estimateSwap and kit.swap.

KitError fields

Check code or name for specific handling, type for handling a whole category, and recoverability to decide whether to retry.

Error types

Common error codes

Handling errors

Catch a KitError and branch on code, type, and recoverability:
TypeScript

Simulation failures on Arc testnet

Because Arc testnet liquidity is thin, kit.estimateSwap can succeed while the swap itself fails with one of these errors:
  • INPUT_SLIPPAGE_CONSTRAINT_NOT_MET (1009) when the route is quoted.
  • ONCHAIN_SIMULATION_FAILED (5002) when kit.swap reverts during onchain simulation.
  • ONCHAIN_TRANSACTION_REVERTED (5001) after the transaction is submitted.
To resolve the failure, raise the slippage tolerance above the 300 bps default (for example, 1000 bps):
TypeScript
To set a stop limit instead of a slippage tolerance, see Set slippage tolerance or stop limit.

No route available

Routing failures surface in three ways:
  • INPUT_UNSUPPORTED_ROUTE (1003): the routing layer found no route for the token pair, blockchains, and amount you requested. Change the amount or pick a different token pair, since retrying the same request won’t help.
  • INPUT_SLIPPAGE_CONSTRAINT_NOT_MET (1009): a route exists but not within your slippage tolerance or stop limit. Raise slippageBps or adjust stopLimit.
  • “No quotes available”: a message from the routing provider itself, not the SDK, so you only see it when calling the provider’s API directly. This isn’t a supported integration path, and direct provider calls are rate limited. Route quotes through kit.estimateSwap. If you’re hitting rate limits through the SDK itself, pass a Circle API key in the swap config.