FrakError
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.
Inheritors
Section titled “Inheritors”| NotInitialized |
| Network |
| BackingOff |
| Server |
| Decoding |
| TrackingDisabled |
| AlreadyPresenting |
| MerchantResolutionFailed |
| InternalFailure |
| Name | Summary |
|---|---|
| AlreadyPresenting | class AlreadyPresenting : FrakError id.frak.sdk.ui.FrakSharing.present called while a sheet is already up on the same Activity. |
| BackingOff | class 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. |
| Decoding | class Decoding(message: String, cause: Throwable?) : FrakError 2xx response that couldn’t be read as the expected shape; distinct from Server. |
| InternalFailure | class 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. |
| Kind | enum 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. |
| MerchantResolutionFailed | class MerchantResolutionFailed(message: String) : FrakError No merchant identified: bad packageId, or config has neither merchantId nor packageId. |
| Network | class Network(cause: Throwable) : FrakError DNS failure, no connectivity, TLS failure, timeout. cause carries the underlying java.io.IOException. |
| NotInitialized | class 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. |
| Server | class 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. |
| TrackingDisabled | class 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. |
Properties
Section titled “Properties”| Name | Summary |
|---|---|
| kind | val kind: FrakError.Kind |