Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.startale.com/llms.txt

Use this file to discover all available pages before exploring further.

All errors are instances of ProviderRpcError:
interface ProviderRpcError extends Error {
  code: number
  message: string
  data?: unknown
}

Provider error codes

CodeMeaning
4001User rejected the request
4100Method requires a connected account
4200Unsupported method
4900Provider disconnected
4901Chain disconnected
4902Unsupported chain

RPC error codes

CodeMeaning
-32700Parse error, malformed JSON
-32600Invalid request shape
-32601Method not found
-32602Invalid params
-32603Internal error
-32000Invalid input
-32001Resource not found
-32002Resource unavailable
-32003Transaction rejected
-32004Method not supported
-32005Limit exceeded

Handling

try {
  await provider.request({ method: 'eth_sendTransaction', params: [tx] })
} catch (error) {
  if (error.code === 4001) return        // User cancelled
  if (error.code === 4100) return promptConnect()
  throw error
}
See the SDK errors guide for handling patterns and a wagmi-flavored example.