Error Codes & Messages

Jelli uses exactly the same error codes as Phantom but with enhanced error messages and additional debugging information to help developers build better dApps.


🎯 Error Code Reference

Code
Name
Description
When It Occurs

4001

User Rejected

User declined the request

User clicks "Cancel" or "Reject"

4100

Unauthorized

Wallet not connected or permission denied

Calling methods before connect()

-32000

Invalid Input

Missing or malformed parameters

Bad transaction data or missing fields

-32002

Resource Not Available

Wallet busy or network issues

Multiple simultaneous requests

-32003

Transaction Rejected

Invalid transaction format

Malformed transaction object

-32601

Method Not Found

Unsupported method called

Calling non-existent wallet methods

-32603

Internal Error

Something went wrong in Jelli

Unexpected wallet or network errors


πŸ“¦ Error Object Structure

Standard Phantom-Compatible Format

{
  code: -32003,                           // Error code (same as Phantom)
  message: "Jelli does not recognize a valid transaction.", // Jelli-branded message
  name: "TransactionRejectedError"        // Error type name
}

Enhanced Jelli Format


πŸ›‘οΈ Handling Errors Properly

Basic Error Handling

Advanced Error Handling with Jelli Enhancements


🚨 Common Error Scenarios

1. User Rejection (4001)

2. Wallet Not Connected (4100)

3. Invalid Transaction (-32003)

4. Resource Not Available (-32002)


πŸ”§ Error Prevention Best Practices

1. Always Check Connection

2. Validate Transactions

3. Implement Retry Logic


πŸ’‘ Pro Tip: Jelli's enhanced error information helps you debug faster, but the core error codes remain identical to Phantom for seamless migration!

Last updated