Skip to main content
Every error the SDK reports is a DeepIDVError. Branch on kind for the class of error and on apiCode for the exact server reason.
Kind can gain cases in future releases. In Swift 6, a switch over it needs a default (or @unknown default) branch.

DeepIDVError

Kinds

API error codes

apiCode is set when the server explains a refusal. It’s an open set: compare against these constants and keep a default branch.

Retries the SDK already does

  • 429 and 5xx responses are retried up to maxRetries times with exponential backoff, honoring Retry-After (capped at 60 seconds).
  • Camera and capture errors are never retried automatically.
  • In workflows, Try again on an error screen continues from the current step.