Superbridge
Start typing to search...
The Superbridge API is currently in beta. Endpoints and response formats may change.

Guides

Route Errors

How to handle errors returned by individual route providers

Each route result contains either a quote or an error. When a provider can't return a quote for the requested parameters, the result field will contain an error object with a type field indicating the reason.

Error Types

GenericError

A catch-all error for unexpected failures. Includes an error field with a message.

{
  "type": "GenericError",
  "error": "Something went wrong"
}

AmountTooSmall

The requested amount is below the minimum supported by this provider. May include a minimum field with the smallest acceptable amount, but this is not always available.

{
  "type": "AmountTooSmall",
  "minimum": "1000000"
}

AmountTooLarge

The requested amount exceeds the maximum supported by this provider. May include a maximum field with the largest acceptable amount, but this is not always available.

{
  "type": "AmountTooLarge",
  "maximum": "1000000000000000000000"
}

SlippageExceeded

The quoted output amount falls outside the acceptable slippage tolerance.

{
  "type": "SlippageExceeded"
}

Paused

The route is temporarily paused by the provider.

{
  "type": "Paused"
}

Disabled

The route has been disabled and is not currently available.

{
  "type": "Disabled"
}