STRUCT
HaapiRedirectRefusal
Contents
- Properties
statusCode
public struct HaapiRedirectRefusal: Error, Equatable, Sendable
The cause of a refused HTTP redirect.
The SDK never follows an HTTP redirect: a 301, 302, 303, 307 or 308 response with a non-empty Location — every
response the HTTP stack would follow — is refused and nothing is sent to its target. Any other 3xx, and a 3xx without a
Location, is handled like any other response. The refusal is reported as HaapiError.invalidURLResponse, whose error is "haapi_redirect_refused" and whose cause is a
HaapiRedirectRefusal:
if let refusal = (error as? IdsvrError)?.cause as? HaapiRedirectRefusal {
// refusal.statusCode
}
A refused redirect points to an identity server or reverse-proxy configuration problem. Retrying the same request gives the same result.
Properties
statusCode
public let statusCode: Int
The HTTP status code of the refused redirect response.