Skip to Content

Errors

com.sladeid.biometric.capture.errors. SladeIDError is the open base class (not sealed) extending Exception; each subtype carries a stable code. Operational failures are emitted on flows, never thrown across the API boundary — capture methods return null instead.

SladeIDError (base)

open class SladeIDError( message: String, val code: String = "UNKNOWN", cause: Throwable? = null, ) : Exception(message, cause)

Catch it last when handling session.errors / manager.readerErrors.

Subtypes

ClasscodeMeaningExtra fields
CaptureErrorCAPTURE_ERRORHardware/vendor failure, capture timeout, init error
QualityErrorQUALITY_ERRORQuality threshold not metfinger: Int?, score: Int?
NetworkErrorNETWORK_ERRORMiddleware unreachable, timeout, HTTP errorhttpStatus: Int?
EncryptionErrorENCRYPTION_ERROREnvelope key exchange failed
AuthErrorAUTH_ERRORInvalid token, insufficient permissions, or the credential gate rejected capture

Handling pattern

session.errors.collect { e -> when (e) { is AuthError -> promptReauth() is NetworkError -> retryLater(e.httpStatus) is QualityError -> promptBetterPlacement(e.finger) is CaptureError -> promptReplaceReader() is EncryptionError -> logAndAlert(e) else -> logUnknown(e) // SladeIDError base } }

Not errors

  • match / searchmatched = false — a normal biometric result.
  • verifyEnrollmentpositionVerified = false — a normal “try again”.
  • Reader not plugged in — an empty readers list, never a readerErrors emission.

See Handle failure modes.