Error Codes
Understanding and handling errors
/
Error Format
All errors follow a consistent format:
JSON
{
"error": true,
"code": "INVALID_CREDENTIAL",
"message": "Credential signature verification failed",
"details": {...} // Optional additional info
}
Authentication Errors
| Code | Description | Solution |
|---|---|---|
WALLET_LOCKED |
Wallet is locked | Call wallet.unlock() |
NO_CREDENTIALS |
No credentials found | User needs to authenticate |
PASSKEY_FAILED |
Passkey authentication failed | User cancelled or biometric failed |
SESSION_EXPIRED |
Global session expired | Re-authenticate user |
Credential Errors
| Code | Description | Solution |
|---|---|---|
INVALID_SIGNATURE |
Credential signature invalid | Credential may be tampered |
CREDENTIAL_EXPIRED |
Credential has expired | Request new credential |
CREDENTIAL_REVOKED |
Credential was revoked | Request new credential |
UNTRUSTED_ISSUER |
Issuer not trusted | Check issuer DID |
API Errors
| Code | HTTP | Description |
|---|---|---|
INVALID_API_KEY |
401 | API key invalid or missing |
RATE_LIMITED |
429 | Too many requests |
INVALID_REQUEST |
400 | Malformed request |
SERVER_ERROR |
500 | Internal server error |