EngineError

sealed class EngineError

A failure surfaced by Engine. The caller should not infer retry behavior from the error type alone; it should use StepResult.Failed.recoverable and StepResult.Failed.retryAction.

Engine maps every backend error to one of these; raw backend codes are never exposed.

Inheritors

Types

Link copied to clipboard
data class Internal(val message: String, val cause: Throwable?) : EngineError

Unexpected internal failure.

Link copied to clipboard
data class InvalidFormInput(val errors: List<FormFieldError>) : EngineError

Submitted form values failed Engine's validation, so nothing was sent to the backend. Recoverable: the host shows each error next to its field and resubmits.

Link copied to clipboard
data class InvalidNextInput(val expected: ExpectedInput, val actual: String) : EngineError

The host advanced with the wrong input type for the current step — a programmer error, returned (not thrown). actual is the given input's class name, such as FormSubmission.

Link copied to clipboard
data class InvalidUploadInput(val reason: UploadInputErrorReason, val side: UploadSide?) : EngineError

A submitted upload failed Engine's checks, so nothing was sent to the backend. Recoverable: the host fixes the input and resubmits.

Link copied to clipboard
data class MissingScannerSdk(val stepType: EngineStepType) : EngineError

The workflow has a scanner step whose SDK this app doesn't include, so the step can't run — an integration error, terminal. Engine compiles against the scanner SDKs but doesn't bring them: the app adds BlinkID Verify for EngineStepType.DocumentScan and EngineStepType.VerifyDocument, BlinkCard for EngineStepType.CardScan and Biometrics for EngineStepType.FaceCapture, at the versions the platform BOM gives.

Link copied to clipboard
data object NoNetwork : EngineError

No connection, or the backend can't be reached.

Link copied to clipboard

A step ran out of the retries the workflow allows, so the backend ended the transaction: terminal.

Link copied to clipboard
data class StepValidation(val reason: StepValidationReason, val step: Step) : EngineError

A step's attempt was turned down: the backend refused what was submitted, or the user closed a scanner (StepValidationReason.StepCanceled). The step waits to be tried again.

Link copied to clipboard
data object Timeout : EngineError

The backend was still working on the step when NetworkRetryPolicy.maxAttempts ran out. Session.next asks it again.

Link copied to clipboard
data class UnsupportedWorkflowVersion(val sdkVersion: String, val workflowVersion: String) : EngineError

The transaction's workflow was built for an older major.minor SDK version than this one, so Engine.startSession refused it: an integration error, terminal. Engine has asked the backend to end the transaction, giving both versions. The workflow has to be updated to this SDK's major.minor version or a later one.

Link copied to clipboard

Engine couldn't run the step: the backend failed or ended the transaction, the workflow has a step this SDK can't run, or a scanner failed or has no license.