ENUM
HaapiError
Contents
- Cases
communication(message:cause:)
serverError(_:errorDescription:statusCode:)
invalidStatusCode(_:)
invalidURLResponse(_:reason:cause:)
attestationNotSupported
attestationFailure(cause:)
attestationKeyGenFailure(cause:)
attestationRefusedByServer(cause:)
assertionFailure(cause:)
dpopKeyCreationFailure(cause:)
dpopProofCreationFailure(cause:)
dpopProofFailure(message:cause:)
haapiTokenManagerIsClosed
haapiTokenManagerIsExpired
illegalState(message:)
invalidConfiguration(reason:)
haapiTokenManagerAlreadyExists(name:)
- Properties
failureReason
errorDescription
error
cause
recoverySuggestion
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.
- Parameter message: the description of the error
- Parameter cause: optional
Error
that caused thisHaapiError
. Used to convey further details of theHaapiError
.
serverError(_:errorDescription:statusCode:)
case serverError(_ error: String, errorDescription: String, statusCode: Int)
A server error with the error
, the error description
and the status code
.
- Parameter error: the error.
- Parameter errorDescription: the error description.
- Parameter statusCode: the HTTP status code.
invalidStatusCode(_:)
case invalidStatusCode(_ statusCode: Int)
Unsupported status code:
- Parameter statusCode: the HTTP status code returned.
invalidURLResponse(_:reason:cause:)
case invalidURLResponse(_ response: URLResponse?, reason: String, cause: Error? = nil)
Invalid response.
- Parameters:
- response: The URL response.
- reason: The reason of this invalid URL response.
- cause: The optional cause of the failure.
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.
- Parameter message: the description of the error.
- Parameter cause:
Error
that contains information about the origin of thisHaapiError
.
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