본문으로 건너뛰기

Error code

Pali는 JSON-RPC, EIP-1193, EIP-1474, wallet-specific error를 사용합니다. dapp은 항상 error.codeerror.message를 모두 검사해야 합니다.

Standard JSON-RPC

Code의미
-32700Parse error.
-32600Invalid request.
-32601Method not found 또는 unavailable.
-32602Invalid params.
-32603Internal error.

Ethereum provider error

Code의미
4001사용자가 요청을 거절했습니다.
4100승인되지 않은 account 또는 method입니다.
4200지원되지 않는 method입니다.
4900Provider가 disconnected 상태입니다.
4901Provider가 지정된 chain에서 disconnected 상태입니다.

EIP-1474 style error

Code의미
-32000Invalid input.
-32001Resource not found.
-32002Resource unavailable.
-32003Transaction rejected.
-32004Method not supported.
-32005Request limit exceeded.

Pali-specific common error

Code의미
4101method는 EVM-only 또는 UTXO-only처럼 다른 chain family에서만 사용할 수 있습니다.
4874method는 hardware wallet을 지원하지 않습니다.
5710bundle의 체인에 대한 RPC가 지갑에 설정되어 있지 않습니다 (wallet_getCallsStatus / wallet_showCallsStatus).
5720wallet_sendCalls에서 dapp이 제공한 bundle id가 중복되었습니다.
5730wallet_getCallsStatus / wallet_showCallsStatus의 알 수 없는 bundle id입니다.

Best practice

  • 4001은 일반적인 user cancellation으로 취급하세요.
  • 4101은 사용자를 올바른 network family로 안내하라는 prompt로 취급하세요.
  • blocking request를 tight loop로 retry하지 마세요. Pali는 popup spam으로부터 사용자를 보호합니다.
  • 특히 guardian or module configuration에서 passkey sponsor failure에 대해 actionable copy를 보여주세요.