> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# LeaseLostError

> Class exported by @botmesh/core.

Defined in: [coordination/types.ts:55](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/types.ts#L55)

Thrown when work runs under a turn or leadership that is no longer held: the lease
expired (pause, partition), another replica superseded it, the coordinator became
unreachable, or it was stopped. Sends from a chat whose turn was lost reject with it
instead of reaching the transport out of order.

## Extends

* `Error`

## Constructors

### Constructor

```ts theme={null}
new LeaseLostError(
   key, 
   fence, 
   reason
): LeaseLostError;
```

Defined in: [coordination/types.ts:56](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/types.ts#L56)

#### Parameters

| Parameter | Type |
| - | - |
| `key` | `string` |
| `fence` | `number` |
| `reason` | [`LeaseLossReason`](https://botmesh.afaya.com.co/api/core/type-aliases/LeaseLossReason) |

#### Returns

`LeaseLostError`

#### Overrides

`Error.constructor`

## Properties

### key

```ts theme={null}
readonly key: string;
```

Defined in: [coordination/types.ts:57](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/types.ts#L57)

***

### fence

```ts theme={null}
readonly fence: number;
```

Defined in: [coordination/types.ts:58](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/types.ts#L58)

***

### reason

```ts theme={null}
readonly reason: LeaseLossReason;
```

Defined in: [coordination/types.ts:59](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/types.ts#L59)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.