Skip to main content

Error codes

We wrap all known errors, adding some extra fields to make it easy to control exceptions. It's also possible to use the message field of ErrorWrapper object to inform users about the details of the exception.

Additional fields to Error object:

  • code: number - error code
  • codeDesc: string - error code definition

This table lists the error code information returned by PolidoSDK when an error is thrown.

Error codeError code definitionMessage
100CANNOT_CONFIRM_TRANSACTIONGot an error from the blockchain during transaction confirmation, so this error could have different messages directly from the blockchain
300UNSUPPORTED_CLUSTERPolidoSDK only supports Mainnet or Sepolia, please specify CHAINS.Mainnet or CHAINS.Sepolia
400PROVIDER_REQUIREDA Provider is required to be passed to the constructor
401EXCEED_MAXAmount must not exceed (..)
402NO_ACCOUNT_INFOAccount info was not found
500SERVER_ERRORGeneric Server Error
501POLYGON_API_ERRORError from a call to Lido on Polygon API
502COINGECKO_API_ERRORError from a call to Coingecko API