# withRetry

**Kind:** Function

**Source:** [`atloria-monorepo/packages/api-client/src/utils/retry.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/api-client/src/utils/retry.ts#L77)

Retry a function with exponential backoff

## Signature

```ts
async function withRetry(fn: () => Promise<T>, options: RetryOptions): Promise<T>
```

## Parameters

| Name | Type |
|---|---|
| `fn` | `() => Promise<T>` |
| `options` | `RetryOptions` |

**Returns:** `Promise<T>`
