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

# GuardFailure<S>

> Type alias exported by @botmesh/core.

```ts theme={null}
type GuardFailure<S> = 
  | string
  | DynamicText<S>
  | {
  message?: string | DynamicText<S>;
  redirect?: string | FlowBuilder<object>;
};
```

Defined in: [flows/FlowBuilder.ts:156](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/FlowBuilder.ts#L156)

What a `.guard()` does when its predicate fails. A string / dynamic text is a farewell message (the conversation ends).

## Type Parameters

| Type Parameter | Default type |
| - | - |
|  `S` *extends* `object` | [`EmptyFlowState`](https://botmesh.afaya.com.co/api/core/type-aliases/EmptyFlowState) |

## Union Members

`string`

***

[`DynamicText`](https://botmesh.afaya.com.co/api/core/type-aliases/DynamicText)\<`S`>

***

### Type Literal

```ts theme={null}
{
  message?: string | DynamicText<S>;
  redirect?: string | FlowBuilder<object>;
}
```

| Name | Type | Description | Defined in |
| - | - | - | - |
| `message?` | `string` \| [`DynamicText`](https://botmesh.afaya.com.co/api/core/type-aliases/DynamicText)\<`S`> | Message sent before ending (or before redirecting). | [flows/FlowBuilder.ts:161](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/FlowBuilder.ts#L161) |
| `redirect?` | `string` \| [`FlowBuilder`](https://botmesh.afaya.com.co/api/core/classes/FlowBuilder)\<`object`> | Jump to another conversation instead of ending (like `c.goto(name)`). | [flows/FlowBuilder.ts:163](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/FlowBuilder.ts#L163) |


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