> ## 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.

# ChaosSendFailureOptions

> Interface exported by @botmesh/core/testing.

Defined in: [testing/chaos.ts:196](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L196)

Transient outbound failures.

## Properties

### probability?

```ts theme={null}
probability?: number;
```

Defined in: [testing/chaos.ts:201](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L201)

Probability `[0, 1]` that a send fails. Defaults to `1`, or to `0` when
`attempts` is given (scripted failures only).

***

### attempts?

```ts theme={null}
attempts?: number[];
```

Defined in: [testing/chaos.ts:203](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L203)

1-based send attempts that always fail (deterministic script), e.g. `[1, 3]`.

***

### errors?

```ts theme={null}
errors?: (
  | ChaosSendErrorKind
  | ChaosErrorFactory)[];
```

Defined in: [testing/chaos.ts:208](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L208)

Failure kinds/factories used in order, cycling (1st failure → `errors[0]`,
2nd → `errors[1]`, …). Default `['rate-limited']`.

***

### retryAfterMs?

```ts theme={null}
retryAfterMs?: number;
```

Defined in: [testing/chaos.ts:210](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L210)

`retryAfterMs` carried by `'rate-limited'` failures. Default `1000`.

***

### maxConsecutive?

```ts theme={null}
maxConsecutive?: number;
```

Defined in: [testing/chaos.ts:215](https://github.com/andresayac/botmesh/blob/main/packages/core/src/testing/chaos.ts#L215)

Longest streak of probabilistic failures before a send is forced through
(keeps failures transient). Default `Infinity`.


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