@statechannels/client-api-schema > ErrorCodes

ErrorCodes type

Error codes that might be returned by the wallet

Signature:

export declare type ErrorCodes = {
EnableEthereum: {
EthereumNotEnabled: 100;
};
CloseAndWithdraw: {
UserDeclined: 200;
};
CloseChannel: {
NotYourTurn: 300;
ChannelNotFound: 301;
};
UpdateChannel: {
ChannelNotFound: 400;
InvalidTransition: 401;
InvalidAppData: 402;
NotYourTurn: 403;
ChannelClosed: 404;
};
SyncChannel: {
ChannelNotFound: 1400;
};
PushMessage: {
WrongParticipant: 900;
};
CreateChannel: {
SigningAddressNotFound: 1000;
InvalidAppDefinition: 1001;
};
JoinChannel: {
ChannelNotFound: 1100;
InvalidTransition: 1101;
};
GetState: {
ChannelNotFound: 1200;
};
ChallengeChannel: {
ChannelNotFound: 1300;
};
};

Remarks

Errors conform to the [JSON-RPC 2.0 error spec](https://www.jsonrpc.org/specification\#error\_object). Beyond the standard errors from that spec, the following domain-specific errors are possible:

  • 100: The wallet approval was rejected by the Web3 provider.
  • 200: The user declines
  • 300: You cannot close the channel when it is not your turn
  • 400: Channel not found
  • 900: The message is not addressed to this wallet.
  • 1000: The wallet can't find the signing key corresponding to the first signing address in the participants array.
  • 1001: There isn't a contract deployed at the app definition address.
  • 1100: The wallet can't find the channel corresponding to the channelId
  • 1101: The wallet contains invalid state data
  • 1200: The wallet can't find the channel corresponding to the channelId
  • 1300: The wallet can't find the channel corresponding to the channelId

Last updated on by geoknee