> ## 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.

# Errors

> Error codes thrown by the SDK provider.

All errors are instances of `ProviderRpcError`:

```ts theme={null}
interface ProviderRpcError extends Error {
  code: number
  message: string
  data?: unknown
}
```

## Provider error codes

| Code   | Meaning                             |
| ------ | ----------------------------------- |
| `4001` | User rejected the request           |
| `4100` | Method requires a connected account |
| `4200` | Unsupported method                  |
| `4900` | Provider disconnected               |
| `4901` | Chain disconnected                  |
| `4902` | Unsupported chain                   |

## RPC error codes

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

## Handling

```ts theme={null}
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](/app-sdk/errors) for handling patterns and a wagmi-flavored example.
