FrakError
enum FrakErrorEvery failure the SDK can hand back.
Conforms to Foundation.LocalizedError, Swift.Copyable, Swift.Error, Swift.Escapable, Swift.Sendable
Defined in: Sources/FrakSDK/Core/FrakError.swift:4
FrakError.alreadyPresenting
Section titled “FrakError.alreadyPresenting”case alreadyPresentingA sharing sheet was presented while one was already up.
FrakError.backingOff(retryAfterSeconds:)
Section titled “FrakError.backingOff(retryAfterSeconds:)”case backingOff(retryAfterSeconds: TimeInterval)This resource is in a backoff window, so nothing was sent — unlike network, where a
request was attempted. Any cached copy is served in preference to raising this.
FrakError.decoding(message:)
Section titled “FrakError.decoding(message:)”case decoding(message: String)A 2xx response arrived but could not be read as the shape we expect.
FrakError.internalFailure(message:)
Section titled “FrakError.internalFailure(message:)”case internalFailure(message: String)A failure inside the SDK: an unexpected error that escaped an internal boundary, or a
device capability it needs and cannot get. Not decoding, which describes a backend body.
FrakError.merchantResolutionFailed(reason:)
Section titled “FrakError.merchantResolutionFailed(reason:)”case merchantResolutionFailed(reason: String)No merchant could be identified for this app.
FrakError.network(underlying:)
Section titled “FrakError.network(underlying:)”case network(underlying: any Error)The request never reached the backend, or the response never came back.
FrakError.notInitialized
Section titled “FrakError.notInitialized”case notInitializedA client method was reached before Frak.initialize(_:).
FrakError.server(status:code:retryAfterSeconds:)
Section titled “FrakError.server(status:code:retryAfterSeconds:)”case server(status: Int, code: String?, retryAfterSeconds: Int?)The backend answered with a non-2xx status.
FrakError.trackingDisabled
Section titled “FrakError.trackingDisabled”case trackingDisabledA tracking call was made while tracking is not permitted — either because this build
ships FrakConfig(trackingEnabled: false) or because FrakClient.setTrackingEnabled(false)
was called at runtime. Not raised by config or reward resolution, which are deliberately
ungated.
Properties
Section titled “Properties”errorDescription
Section titled “errorDescription”var errorDescription: String? { get }A localized message describing what error occurred.
failureReason
Section titled “failureReason”var failureReason: String? { get }A localized message describing the reason for the failure.
helpAnchor
Section titled “helpAnchor”var helpAnchor: String? { get }A localized message providing “help” text if the user requests help.
var kind: FrakError.Kind { get }localizedDescription
Section titled “localizedDescription”var localizedDescription: String { get }Retrieve the localized description for this error.
recoverySuggestion
Section titled “recoverySuggestion”var recoverySuggestion: String? { get }A localized message describing how one might recover from the failure.