ENUM

HaapiError

Contents

public enum HaapiError: IdsvrError, Error

HAAPI error responses

Cases

communication(message:cause:)

case communication(message: String, cause: Error? = nil)

An error occurred during communication or attempted communication.

serverError(_:errorDescription:statusCode:)

case serverError(_ error: String, errorDescription: String, statusCode: Int)

A server error with the error, the error description and the status code.

invalidStatusCode(_:)

case invalidStatusCode(_ statusCode: Int)

Unsupported status code:

invalidURLResponse(_:reason:cause:)

case invalidURLResponse(_ response: URLResponse?, reason: String, cause: Error? = nil)

Invalid response.

attestationNotSupported

case attestationNotSupported

Attestation or assertions are not supported by the platform. These are part of Apple's DeviceCheck services.

This could be caused by the app being executed in a simulated environment instead of on a real device.

attestationFailure(cause:)

case attestationFailure(cause: Error? = nil)

The attestation procedure failed.

When a cause is available, it could indicate more details on the error from Apple's Device Check service.

attestationKeyGenFailure(cause:)

case attestationKeyGenFailure(cause: Error? = nil)

The generation of a new attestation key failed.

When a cause is available, it could indicate more details on the error from Apple's Device Check service.

attestationRefusedByServer(cause:)

case attestationRefusedByServer(cause: Error? = nil)

The attestation sent over to the server was rejected.

When a cause is available, it could indicate more details on the error from the server.

assertionFailure(cause:)

case assertionFailure(cause: Error? = nil)

The generation of an Assertion failed.

When a cause is available, it could indicate more details on the error from Apple's Device Check service.

dpopKeyCreationFailure(cause:)

case dpopKeyCreationFailure(cause: Error)

The generation of a new DPoP key failed.

Details of the error are available as the cause of the error.

dpopProofCreationFailure(cause:)

case dpopProofCreationFailure(cause: Error)

The generation of a DPoP Proof JWT failed.

Details of the error are available as the cause of the error.

dpopProofFailure(message:cause:)

case dpopProofFailure(message: String, cause: Error)

Failure for the provided Dpop token endpoint binding configuration enforcement.

haapiTokenManagerIsClosed

case haapiTokenManagerIsClosed

An operation of a HaapiTokenManager was attempted after it was closed.

haapiTokenManagerIsExpired

case haapiTokenManagerIsExpired

An operation of aHaapiTokenManager was attempted on a HaapiTokenManager that was no longer valid.

This is an exceptional case that is caused by asynchronous operations scheduled to operate after the HaapiTokenManager instance was disposed of.

illegalState(message:)

case illegalState(message: String)

The HaapiTokenManager was in an illegal state when attempting to perform an operation.

A description of how the state was found to be invalid can be found in the message of the error.

invalidConfiguration(reason:)

case invalidConfiguration(reason: String)

An invalid configuration.

haapiTokenManagerAlreadyExists(name:)

case haapiTokenManagerAlreadyExists(name: String)

An existing name cannot be reused to instantiate an HaapiTokenManager.

Properties

failureReason

public var failureReason: String

errorDescription

public var errorDescription: String?

error

public var error: String

cause

public var cause: (any Error)?

recoverySuggestion

public var recoverySuggestion: IdsvrErrorHandling