Error Handling
DotPassportError
Import
import { DotPassportError } from '@dotpassport/sdk';Properties
Property
Type
Description
Example
try {
const scores = await client.getScores(address);
} catch (error) {
if (error instanceof DotPassportError) {
console.log('Status:', error.statusCode); // 404
console.log('Message:', error.message); // "User not found"
console.log('Response:', error.response); // Full error details
}
}Error Codes Reference
Status
Error
Description
Solution
Basic Error Handling
Specific Error Handling
Retry Logic
Error Recovery Patterns
Fallback Values
Graceful Degradation
React Error Boundary
Logging Errors
Related
Last updated
