Aller au contenu

FrakError

Ce contenu n’est pas encore disponible dans votre langue.

sealed class FrakError : Exception

Every failure the SDK can hand back, as one closed hierarchy. CancellationException is never wrapped into one of these, see frakCall. No default arguments anywhere: a sealed class’s constructor is published, so a default would freeze a synthetic bridge into the .api dump.

NotInitialized
Network
BackingOff
Server
Decoding
TrackingDisabled
AlreadyPresenting
MerchantResolutionFailed
InternalFailure
NameSummary
AlreadyPresentingclass AlreadyPresenting : FrakError
id.frak.sdk.ui.FrakSharing.present called while a sheet is already up on the same Activity.
BackingOffclass BackingOff(val retryAfterSeconds: Double) : FrakError
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.
Decodingclass Decoding(message: String, cause: Throwable?) : FrakError
2xx response that couldn’t be read as the expected shape; distinct from Server.
InternalFailureclass InternalFailure(message: String, cause: Throwable?) : FrakError
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.
Kindenum Kind : Enum<FrakError.Kind>
Stable discriminator, one per arm. A when over Kind with an else survives a new arm; a when over the hierarchy does not. wireValue is spelled identically on iOS.
MerchantResolutionFailedclass MerchantResolutionFailed(message: String) : FrakError
No merchant identified: bad packageId, or config has neither merchantId nor packageId.
Networkclass Network(cause: Throwable) : FrakError
DNS failure, no connectivity, TLS failure, timeout. cause carries the underlying java.io.IOException.
NotInitializedclass NotInitialized : FrakError
Client method reached before id.frak.sdk.Frak.initialize. A class, not an object: fillInStackTrace() runs at construction, so a singleton would report the first call site.
Serverclass Server(val status: Int, val code: String?, val retryAfterSeconds: Long?) : FrakError
Non-2xx status. code is the { success: false, error, code } envelope’s code when present, null for plain-text bodies. retryAfterSeconds only from a Retry-After header.
TrackingDisabledclass TrackingDisabled : FrakError
A tracking call made while tracking is not permitted, by config or at runtime. Not raised by config or reward resolution, which are ungated.
NameSummary
kindval kind: FrakError.Kind