CeiError

sealed class CeiError : Exception

All errors that can be thrown by EidKit SDK operations.

Every operation that interacts with the card throws a CeiError subtype on failure. Callers should handle at minimum WrongPin (to show remaining attempts) and PinBlocked (to prevent further attempts). All other subtypes indicate non-recoverable session failures.

Inheritors

Types

Link copied to clipboard
class CardLost(cause: Throwable? = null) : CeiError

The NFC tag was lost or the card was moved away during a session. Ask the user to hold the card steady and try again.

Link copied to clipboard

A value provided in ro.eidkit.sdk.config.EidKitConfig is invalid.

Link copied to clipboard
class NfcUnsupported(message: String = "NFC is not available or is disabled on this device") : CeiError

The device does not support NFC, or NFC is disabled. Check android.nfc.NfcAdapter.isEnabled before launching a session.

Link copied to clipboard

The SDK was not configured correctly before use. Call ro.eidkit.sdk.EidKit.configure before launching any session.

Link copied to clipboard

PACE secure channel establishment failed. This usually means an incorrect CAN was provided, or the card is not a Romanian CEI.

Link copied to clipboard
class PassiveAuthFailed(message: String, cause: Throwable? = null) : CeiError

Passive authentication failed — the data on the card does not match the SOD signature, or the Document Signing Certificate does not chain to the trusted CSCA root. The data is still returned in ro.eidkit.sdk.model.ReadResult with ro.eidkit.sdk.model.PassiveAuthStatus.Invalid.

Link copied to clipboard

The PIN has been blocked after too many incorrect attempts. The card must be unblocked at a government service point (ghișeu MAI).

Link copied to clipboard
class Unexpected(message: String, cause: Throwable? = null) : CeiError

An unexpected error occurred during a card session. Inspect cause for the underlying exception.

Link copied to clipboard
class WrongPin(val attemptsRemaining: Int) : CeiError

The entered PIN was incorrect.