Skip to Content
ReferenceErrors

Errors

All errors extend SladeIDError and carry a code: string field. Catch by class for broad recovery, branch on code for specifics.

Core errors

ClassCodeThrown whenRecovery
SladeIDErrorCONFIG_INVALIDRequired config missing (e.g. middlewareUrl)Fix config
SladeIDErrorCONFIG_NOT_SUPPORTEDencryptBiometrics.face set true (unsupported in V0)Drop the option
SladeIDErrorBAD_REQUESTBackend returned a 4xx the SDK didn’t map (no code in body)Fix the request
CaptureErrorCAMERA_PERMISSION_DENIEDUser blocked or dismissed the camera promptSurface a permission UI; see the camera guide
CaptureErrorCAMERA_NOT_FOUNDNo camera device is presentAsk the user to connect a camera
CaptureErrorCAMERA_IN_USECamera is held by another app or tabAsk the user to close the other consumer
CaptureErrorCAMERA_ACCESS_FAILEDgetUserMedia failed for another reasonRetry; verify the device
CaptureErrorSESSION_ALREADY_STARTEDstart() called twiceCall stop() first
CaptureErrorNOT_IMPLEMENTED_V0Active liveness challenges configuredActive challenges are not implemented; omit activeChallenges
CaptureErrorNO_CAMERACapture attempted before the camera stream was readyWait for 'started'
CaptureErrorNO_CANVAS_CTXCanvas 2D context unavailableVerify the environment supports <canvas>
CaptureErrorCAPTURE_FAILEDcanvas.toBlob returned null, or capture canceledRetry
QualityErrorFACE_QUALITY_EXHAUSTEDMax face-quality retries exceededImprove lighting, framing
NetworkErrorTIMEOUTBackend took longer than timeoutMsRetry; bump timeoutMs if justified
NetworkErrorNETWORK_FAILUREfetch rejected (DNS, CORS, offline)Check connectivity, CORS config
NetworkErrorSERVER_ERRORBackend returned a 5xxRetry; escalate with X-SDK-Version
NetworkErrorNON_JSON_RESPONSEA 2xx body wasn’t valid JSONCheck the backend / any proxy in front of it
AuthErrorUNAUTHORIZEDBackend returned 401Token expired or rejected; backend mints a fresh one, SDK re-requests via getToken()
AuthErrorFORBIDDENBackend returned 403Check the token’s scope / roles

EncryptionError (codes NO_WEB_CRYPTO, NO_BASE64) is forward-compat only; face payloads are sent as plaintext base64 via NoopEncryptor. In V0 a missing base64 codec surfaces as a SladeIDError/CaptureError with code NO_BASE64, not an EncryptionError.

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.

ClassCode
ConnectionErrorREADER_CONNECTION_FAILED
TimeoutErrorREADER_TIMEOUT
ReaderAuthErrorREADER_AUTH_FAILED
DeviceUnavailableErrorREADER_DEVICE_UNAVAILABLE
ReaderValidationErrorREADER_VALIDATION_FAILED
ReaderServerErrorREADER_SERVER_ERROR
BiometricMismatchErrorREADER_BIOMETRIC_MISMATCH

See also