ENUM

HaapiErrorCode

Contents

public enum HaapiErrorCode: String, Sendable

The specific codes reported through IdsvrError.error for refusals raised by the SDK itself — a request the SDK declined to make — as opposed to OAuth or transport errors.

IdsvrError.error carries two kinds of value. Most failures report a coarse category shared by every framework — "networking", "haapi", "unexpected", and, from IdsvrHaapiDriver, "attestation" and "dpop" — which says what went wrong but not which check rejected the call. A refusal instead reports one of the specific codes below. Only these are enumerated here; the categories are not, since they are produced by all three frameworks rather than owned by this one.

One case exists today. Expect the list to grow as further refusals are added; a code, once published, keeps its raw value.

Compare against the error of a failed HaapiResult:

if case .error(let error) = result,
   (error as? IdsvrError)?.error == HaapiErrorCode.nonHaapiLink.rawValue
{
    // The link target was not the configured identity server; no request was sent.
}

Cases

nonHaapiLink

case nonHaapiLink = "non_haapi_link"

A link follow was refused because its target is not the configured identity server.