# FrakError

sealed class FrakError : [Exception](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Exception.html)

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

| |
|---|
| [NotInitialized](/developers/references/android/id-frak-sdk-core/frakerror/notinitialized/) |
| [Network](/developers/references/android/id-frak-sdk-core/frakerror/network/) |
| [BackingOff](/developers/references/android/id-frak-sdk-core/frakerror/backingoff/) |
| [Server](/developers/references/android/id-frak-sdk-core/frakerror/server/) |
| [Decoding](/developers/references/android/id-frak-sdk-core/frakerror/decoding/) |
| [TrackingDisabled](/developers/references/android/id-frak-sdk-core/frakerror/trackingdisabled/) |
| [AlreadyPresenting](/developers/references/android/id-frak-sdk-core/frakerror/alreadypresenting/) |
| [MerchantResolutionFailed](/developers/references/android/id-frak-sdk-core/frakerror/merchantresolutionfailed/) |
| [InternalFailure](/developers/references/android/id-frak-sdk-core/frakerror/internalfailure/) |

## Types

| Name | Summary |
|---|---|
| [AlreadyPresenting](/developers/references/android/id-frak-sdk-core/frakerror/alreadypresenting/) | class [AlreadyPresenting](/developers/references/android/id-frak-sdk-core/frakerror/alreadypresenting/) : FrakError<br>[id.frak.sdk.ui.FrakSharing.present](/developers/references/android/id-frak-sdk-ui/fraksharing/present/) called while a sheet is already up on the same Activity. |
| [BackingOff](/developers/references/android/id-frak-sdk-core/frakerror/backingoff/) | class [BackingOff](/developers/references/android/id-frak-sdk-core/frakerror/backingoff/)(val retryAfterSeconds: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)) : FrakError<br>This resource is in a backoff window, so nothing was sent — unlike [Network](/developers/references/android/id-frak-sdk-core/frakerror/network/), where a request was attempted. Any cached copy is served in preference to raising this. |
| [Decoding](/developers/references/android/id-frak-sdk-core/frakerror/decoding/) | class [Decoding](/developers/references/android/id-frak-sdk-core/frakerror/decoding/)(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), cause: [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)?) : FrakError<br>2xx response that couldn't be read as the expected shape; distinct from [Server](/developers/references/android/id-frak-sdk-core/frakerror/server/). |
| [InternalFailure](/developers/references/android/id-frak-sdk-core/frakerror/internalfailure/) | class [InternalFailure](/developers/references/android/id-frak-sdk-core/frakerror/internalfailure/)(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), cause: [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)?) : FrakError<br>A failure inside the SDK: an unexpected error that escaped an internal boundary, or a device capability it needs and cannot get. Not [Decoding](/developers/references/android/id-frak-sdk-core/frakerror/decoding/), which describes a backend body. |
| [Kind](/developers/references/android/id-frak-sdk-core/frakerror/kind/) | enum [Kind](/developers/references/android/id-frak-sdk-core/frakerror/kind/) : [Enum](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-enum/index.html)&lt;[FrakError.Kind](/developers/references/android/id-frak-sdk-core/frakerror/kind/)&gt; <br>Stable discriminator, one per arm. A `when` over [Kind](/developers/references/android/id-frak-sdk-core/frakerror/kind/) with an `else` survives a new arm; a `when` over the hierarchy does not. wireValue is spelled identically on iOS. |
| [MerchantResolutionFailed](/developers/references/android/id-frak-sdk-core/frakerror/merchantresolutionfailed/) | class [MerchantResolutionFailed](/developers/references/android/id-frak-sdk-core/frakerror/merchantresolutionfailed/)(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)) : FrakError<br>No merchant identified: bad `packageId`, or config has neither `merchantId` nor `packageId`. |
| [Network](/developers/references/android/id-frak-sdk-core/frakerror/network/) | class [Network](/developers/references/android/id-frak-sdk-core/frakerror/network/)(cause: [Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html)) : FrakError<br>DNS failure, no connectivity, TLS failure, timeout. cause carries the underlying [java.io.IOException](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html). |
| [NotInitialized](/developers/references/android/id-frak-sdk-core/frakerror/notinitialized/) | class [NotInitialized](/developers/references/android/id-frak-sdk-core/frakerror/notinitialized/) : FrakError<br>Client method reached before [id.frak.sdk.Frak.initialize](/developers/references/android/id-frak-sdk/frak/initialize/). A `class`, not an `object`: `fillInStackTrace()` runs at construction, so a singleton would report the first call site. |
| [Server](/developers/references/android/id-frak-sdk-core/frakerror/server/) | class [Server](/developers/references/android/id-frak-sdk-core/frakerror/server/)(val status: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val code: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)?, val retryAfterSeconds: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)?) : FrakError<br>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](/developers/references/android/id-frak-sdk-core/frakerror/trackingdisabled/) | class [TrackingDisabled](/developers/references/android/id-frak-sdk-core/frakerror/trackingdisabled/) : FrakError<br>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

| Name | Summary |
|---|---|
| [kind](/developers/references/android/id-frak-sdk-core/frakerror/kind-prop/) | val [kind](/developers/references/android/id-frak-sdk-core/frakerror/kind-prop/): [FrakError.Kind](/developers/references/android/id-frak-sdk-core/frakerror/kind/) |