# FrakError

```swift
enum FrakError
```

Every 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](https://github.com/frak-id/wallet/blob/35995d05c807efe1e0d6319fdede3ad363124d1e/sdk/ios/Sources/FrakSDK/Core/FrakError.swift#L4)

## Cases

### FrakError.alreadyPresenting

```swift
case alreadyPresenting
```

A sharing sheet was presented while one was already up.

### FrakError.backingOff(retryAfterSeconds:)

```swift
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:)

```swift
case decoding(message: String)
```

A 2xx response arrived but could not be read as the shape we expect.

### FrakError.internalFailure(message:)

```swift
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:)

```swift
case merchantResolutionFailed(reason: String)
```

No merchant could be identified for this app.

### FrakError.network(underlying:)

```swift
case network(underlying: any Error)
```

The request never reached the backend, or the response never came back.

### FrakError.notInitialized

```swift
case notInitialized
```

A client method was reached before `Frak.initialize(_:)`.

### FrakError.server(status:code:retryAfterSeconds:)

```swift
case server(status: Int, code: String?, retryAfterSeconds: Int?)
```

The backend answered with a non-2xx status.

### FrakError.trackingDisabled

```swift
case trackingDisabled
```

A 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

### errorDescription

```swift
var errorDescription: String? { get }
```

A localized message describing what error occurred.

### failureReason

```swift
var failureReason: String? { get }
```

A localized message describing the reason for the failure.

### helpAnchor

```swift
var helpAnchor: String? { get }
```

A localized message providing "help" text if the user requests help.

### kind

```swift
var kind: FrakError.Kind { get }
```

### localizedDescription

```swift
var localizedDescription: String { get }
```

Retrieve the localized description for this error.

### recoverySuggestion

```swift
var recoverySuggestion: String? { get }
```

A localized message describing how one might recover from the failure.