Errors
All errors extend SladeIDError and carry a code: string field. Catch by class for broad recovery, branch on code for specifics.
Core errors
| Class | Code | Thrown when | Recovery |
|---|---|---|---|
SladeIDError | CONFIG_INVALID | Required config missing | Fix config |
SladeIDError | CONFIG_NOT_SUPPORTED | An unsupported config option was set | Drop the option |
SladeIDError | NO_SAMPLE_PROVIDED | matchFingerprint called with empty array | Pass at least one sample |
CaptureError | SESSION_ALREADY_STARTED | start() called twice | Call stop() first |
CaptureError | NOT_IMPLEMENTED_V0 | Active liveness challenges configured | Use passive antispoof only |
CaptureError | NO_CAMERA | Camera failed to open | Check permissions, retry |
CaptureError | NO_CANVAS_CTX | Canvas 2D context unavailable | Verify the environment supports <canvas> |
CaptureError | CAPTURE_FAILED | canvas.toBlob returned null, or capture canceled | Retry |
CaptureError | WORKERS_NOT_INITIALIZED | Quality workers not ready | Wait for 'started' before calling internals |
QualityError | FACE_QUALITY_FAILED | Max face-quality retries exceeded | Improve lighting, framing |
QualityError | ANTISPOOF_FAILED | Anti-spoof score below threshold for maxAntispoofRetries | Confirm live face, not a photo |
QualityError | QUALITY_GATE_FAILED | Fingerprint quality below threshold for max retries | Improve lighting, finger placement |
NetworkError | REQUEST_TIMEOUT | Backend took longer than timeoutMs | Retry; bump timeoutMs if justified |
NetworkError | NETWORK_ERROR | Fetch rejected (DNS, CORS, etc.) | Check connectivity, CORS config |
AuthError | UNAUTHORIZED | Backend returned 401 | Issue a fresh ClientSecret |
EncryptionError | NO_WEB_CRYPTO | window.crypto.subtle unavailable | Use HTTPS or localhost |
EncryptionError | NO_BASE64 | atob / btoa unavailable | Polyfill |
Fingerprint reader errors
Thrown by the fingerprint reader client when communicating with the SladeID companion application. All extend HwsError and carry a correlationId field for support tickets.
| Class | Code |
|---|---|
ConnectionError | READER_CONNECTION_FAILED |
TimeoutError | READER_TIMEOUT |
ReaderAuthError | READER_AUTH_FAILED |
DeviceUnavailableError | READER_DEVICE_UNAVAILABLE |
ReaderValidationError | READER_VALIDATION_FAILED |
ReaderServerError | READER_SERVER_ERROR |
BiometricMismatchError | READER_BIOMETRIC_MISMATCH |