Skip to main content

Error Codes

Complete reference for SHIELD errors.

API Errors

Authentication

CodeMessageHTTPResolution
AUTH_001”No session token”401Sign in with wallet
AUTH_002”Invalid token”401Re-authenticate
AUTH_003”Token expired”401Sign in again
AUTH_004”SIWE verification failed”401Check signature
AUTH_005”Nonce expired”401Get new nonce

Policy Errors

CodeMessageHTTPResolution
POL_001”Policy not found”404Check policyId
POL_002”Policy expired”410Request new link
POL_003”Max attempts reached”403Link no longer valid
POL_004”Policy revoked”403Contact sender
POL_005”Policy already exists”409Generate new policyId
POL_006”Unauthorized recipient”403Use correct wallet

Validation

CodeMessageHTTPResolution
VAL_001”Invalid policyId format”400Must be 0x + 64 hex
VAL_002”Invalid CID format”400Must be Qm… or bafy…
VAL_003”Invalid address”400Check Ethereum address
VAL_004”Expiry must be future”400Set later timestamp
VAL_005”Max attempts must be > 0”400Set positive number

Rate Limiting

CodeMessageHTTPResolution
RATE_001”Rate limit exceeded”429Wait and retry

Server

CodeMessageHTTPResolution
SRV_001”Internal server error”500Contact support
SRV_002”Database connection failed”500Try again later
SRV_003”IPFS upload failed”502Check Pinata status

Contract Errors

Reverted with reason string:
MessageMeaningWhen
”Policy already exists”policyId takencreatePolicy
”Policy does not exist”Invalid policyIdlogAttempt
”Policy is not valid”valid flag falselogAttempt
”Only the recipient can log an attempt”Wrong callerlogAttempt
”Policy has expired”expiry passedlogAttempt
”Max attempts reached”No attempts leftlogAttempt

Wallet Errors

MetaMask

CodeMessageSolution
4001User rejectedApprove in wallet
-32603Internal errorCheck gas settings
-32000Gas estimation failedIncrease gas limit

WalletConnect

CodeMessageSolution
WC_001Session expiredReconnect wallet
WC_002Chain not supportedSwitch to Base

Decryption Errors

ErrorCauseSolution
”Decryption failed”Wrong keyCheck URL fragment
”Invalid ciphertext”Corrupted dataRe-download from IPFS
”Authentication failed”Tampered dataContent may be corrupted

Network Errors

ErrorCauseSolution
”Failed to fetch”Network issueCheck connection
”CORS error”MisconfigurationContact support
”Timeout”Slow responseRetry later

Troubleshooting Flow

Error occurred


Check HTTP status

    ├── 400 ──▶ Check request format

    ├── 401 ──▶ Re-authenticate

    ├── 403 ──▶ Check permissions

    ├── 404 ──▶ Verify policyId

    ├── 410 ──▶ Link expired, request new

    ├── 429 ──▶ Wait, then retry

    ├── 500 ──▶ Server issue, contact support

    └── Contract ──▶ Check reason string

Contact Support

If error persists: