Error Codes
On failure, header.status === 'failure' and body.error = { code, message }.
Important: the value in body.error.code is the v1 string code (e.g. 'param_error'), not the numeric code. The numeric column below is the internal semantic (JSON-RPC / EIP-1193 / DCENT). Branch on the string.
Catalog
| body.error.code (string) | numeric | standard | meaning / when |
|---|---|---|---|
parse_error | -32700 | JSON-RPC | Payload JSON parse failure — reserved (mapped but no active producer) |
invalid_request | -32600 | JSON-RPC | Malformed request — reserved (mapped but no active producer) |
method_not_found | -32601 | JSON-RPC | Network does not support the method |
param_error | -32602 | JSON-RPC | Bad params — e.g. signMessage called with a non-string message; invalid keyPath (resolves to no currency for the given chainId → routed to a dedicated on-device screen); missing keyPath; bad chainId charset; shape mismatch. Most common in practice: an incomplete transaction — the bridge performs no RPC (the one exception is Polkadot's runtime-metadata lookup), so a missing nonce / sequence / blockhash / fee fails closed here. |
internal_error | -32603 | JSON-RPC | Bridge internal error |
user_cancel | 4001 | EIP-1193 | User rejected at the popup / UI level (account-selection or connection prompt) — distinct from on-device cancel (5004) |
unauthorized | 4100 | EIP-1193 | Popup blocked by the browser (window.open returned null) |
unsupported_method | 4200 | EIP-1193 | Unsupported / unresolvable chain, or device policy rejection (a genuinely unknown method is method_not_found -32601) |
pop-up_closed | 4900 | EIP-1193 | Popup closed (connector) or the device disconnected and auto-reconnect failed (bridge) |
chain_disconnected | 4901 | EIP-1193 | Chain disconnected — reserved. An unknown / unresolvable chainId returns unsupported_method (4200), not 4901 |
device_not_connected | 5001 | DCENT | Device not connected |
device_locked | 5002 | DCENT | Device locked (PIN required) — reserved (no active producer) |
device_timeout | 5003 | DCENT | Hardware response timeout |
user_cancel | 5004 | DCENT | Signature cancelled on the device (connector maps to user_cancel; distinct from popup/UI cancel 4001) |
device_fw_incompatible | 5005 | DCENT | Firmware incompatible |
time_out | 5006 | DCENT | Transport (popup/postMessage) timeout |
protocol_version_mismatch | 5007 | DCENT | connector ↔ bridge protocol major mismatch |
coin_type_error | — | DCENT (v1) | Legacy getAddress(coinType, …) overload only: unsupported coinType (connector isAvaliableCoinType guard). Not emitted on the v2 chainId path |
The request support gate is 2-axis. Before signing, the bridge resolves the request on two axes — chainId and keyPath. An unsupported / unresolvable chainId returns unsupported_method (4200); a chainId whose keyPath matches no currency variant returns param_error (-32602, "Invalid keyPath") and routes to a dedicated on-device screen. This chainId→unsupported_method (4200) mapping is on the sign() / signTransaction path; The same two-axis gate applies to getPublicKey as well — an unresolved chainId surfaces as unsupported_method (4200). A family that defines no slot for the requested method still returns -32601 — see the -32601 row above.
Recommended handling
| code | UX |
|---|---|
user_cancel | Offer retry |
method_not_found / unsupported_method | Hide the feature for that network |
param_error | Fix the request shape |
device_not_connected / pop-up_closed | Prompt to connect / unlock |