Enumerations

The following enumerations are available globally.

  • Represents the progress state of a migration operation.

    MigrationProgress is an enum that tracks the various states of a migration process. It is emitted as an AsyncStream from a migration’s start() method, allowing consumers to monitor migration progress, handle errors, and provide user feedback.

    Progress Flow Sequence

    A typical migration follows this progress sequence:

    1. started — Migration begins.
    2. inProgress — For each step being executed.
    3. stepCompleted — After each step completes successfully.
    4. success — When all steps complete, OR
    5. error — If any step fails with an exception.

    Usage Example

    for await progress in migrationStream {
        switch progress {
        case .started:
            showProgressIndicator()
    
        case .inProgress(let step, let current, let total):
            updateProgressBar(current: current, total: total)
            updateStatus("Step \(current)/\(total): \(step)")
    
        case .stepCompleted(let step):
            logger.i("Completed step: \(step)")
    
        case .success(let message):
            hideProgressIndicator()
            showSuccessMessage(message)
    
        case .error(let step, let error):
            hideProgressIndicator()
            showErrorDialog("Migration failed at step: \(step)", error: error)
        }
    }
    

    Error Handling

    When a migration step throws an exception, the migration process stops and emits an error(step:underlyingError:) event. The error contains both the exception and the step where the failure occurred, enabling precise error handling and debugging.

    See also

    MigrationStep
    See more

    Declaration

    Swift

    public enum MigrationProgress : Sendable

Error Types

  • Errors that can occur during URI parsing.

    See more

    Declaration

    Swift

    public enum UriParseError : Error, LocalizedError, Sendable
  • Supported URI Schemes for MFA

    See more

    Declaration

    Swift

    public enum UriScheme : String, CaseIterable, Sendable
  • Errors that can occur during URI parsing.

    See more

    Declaration

    Swift

    public enum Base64Error : Error, LocalizedError, Sendable

JWT Error Types

  • Errors that can occur during JWT operations.

    See more

    Declaration

    Swift

    public enum JwtError : Error, LocalizedError, Sendable