ProviderRpcError with a code, message, and optional data field.
Provider errors
| Code | Name | Meaning |
|---|---|---|
4001 | User rejected | User dismissed the popup or rejected the request |
4100 | Unauthorized | Method requires a connected account; call eth_requestAccounts first |
4200 | Unsupported method | The method is not supported by the SDK or in the current context |
4900 | Provider disconnected | The popup is unreachable |
4901 | Chain disconnected | The active chain is not reachable |
4902 | Unsupported chain | Chain not in appChainIds |
RPC errors
| Code | Name | Meaning |
|---|---|---|
-32700 | Parse error | Malformed JSON in request |
-32600 | Invalid request | Request shape invalid |
-32601 | Method not found | Unknown method name |
-32602 | Invalid params | Parameters don’t match the method’s schema |
-32603 | Internal error | Unexpected internal failure |
Handling rejections
Wagmi errors
Wagmi wraps provider errors in its own error types. The samecode values are preserved on the cause field:
Popup-specific failures
| Symptom | Likely cause |
|---|---|
| Popup never opens | Browser popup blocker; the call must be triggered from a user gesture |
| Popup opens then immediately closes | Cross-Origin-Opener-Policy mismatch on the host page |
Connection completes but accountsChanged never fires | Listener registered after connection; subscribe before calling connect |