Error Handling
Handle errors gracefully in your mDL verification implementation.
Error Types
The SDK provides typed errors for different failure scenarios. All errors extendMDLVerificationError:
| Error Code | Description | Recovery |
|---|---|---|
INITIALIZATION_ERROR | SDK failed to initialize | Check API key, network connectivity |
INVALID_API_KEY | API key is invalid or expired | Verify API key in dashboard |
SESSION_EXPIRED | Verification session timed out | Create a new session |
SESSION_CANCELLED | Session was cancelled | Create a new session if needed |
USER_CANCELLED | User declined the request | Inform user, offer retry |
INVALID_RESPONSE | Malformed response from wallet | Request user to try again |
CREDENTIAL_EXPIRED | mDL credential has expired | Inform user to renew mDL |
TRUST_CHAIN_INVALID | Certificate chain validation failed | May indicate fraudulent credential |
SIGNATURE_INVALID | Digital signature verification failed | May indicate tampered credential |
HOLDER_BINDING_FAILED | Device authentication failed | May indicate credential misuse |
NETWORK_ERROR | Network connectivity issue | Retry with exponential backoff |
RATE_LIMIT_EXCEEDED | Too many requests | Wait and retry |
SERVER_ERROR | Owl Eyes API server error | Retry or contact support |
Basic Error Handling
basic-error.tstypescript
Loading...
Specific Error Handling
specific-errors.tstypescript
Loading...
Result Error Handling
When waitForResponse completes without throwing, check the result.success property:
result-errors.tstypescript
Loading...
Retry Configuration
Configure automatic retries for transient errors:
retry-config.tstypescript
Loading...
Logging Errors
logging.tstypescript
Loading...
User-Friendly Error Messages
error-messages.tstypescript
Loading...