Skip to Content
dApps

Troubleshooting

When making requests to OneKey in Establishing a connection, Sending transactions, Signing messages, or RPC calls, OneKey may respond with an error. Here are the error codes and their meanings. These are based on the corresponding errors in EIP-1474  and EIP-1193  on Ethereum.

CodeTitleDescription
4001User Rejected RequestUser rejected the request through OneKey.
4100UnauthorizedThe requested method and/or account has not been authorized by the user.
4500Request TimeoutThe provider request timed out.
-32603Internal ErrorSomething went wrong within OneKey.
-32000Invalid InputMissing or invalid parameters.
-32601Method Not FoundOneKey does not recognize the method.

Typically, these errors will be easily parseable and have both a code and an explanation. For example:

try { await provider.requestSignTransactions({ transactions: [transaction] }); } catch (err) { // {code: 4100, message: 'The requested method and/or account has not been authorized by the user.'} }
Last updated on