Error

When making requests to Goby in establishing a connection, sending a transaction, Making an Offer, or Create an Offer, Goby may respond with an error. Here are the error codes and their meanings. These are inspired the corresponding by EIP-1474 and EIP-1193 on Ethereum.

CodeTitleDescriptioncol
4900DisconnectedGoby could not connect to the network.
4100UnauthorizedThe requested method and/or account has not been authorized by the user.
4001User Rejected RequestThe user rejected the request through Goby.
-32000Invalid InputMissing or invalid parameters.
-32003Transaction RejectedGoby does not recognize a valid transaction.
-32601Method Not FoundGoby does not identify the method.
-32603Internal ErrorSomething went wrong within Goby.

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

try {
const accounts = await window.chia.request({ method: "requestAccounts" });
} catch (err) {
// {code: 4100, message: 'The requested method and/or account has not been authorized by the user.'}
}