---
title: FailureInput
description: "What a Failure carries: `reason`, text for a person, and `detail`, optional JSON for a machine reader."
---

# `FailureInput`

Type, in `@jr2/orchestrator/src/fail.ts`. The signature of an export, or a type that it names, names this type. The [Authoring surface](../authoring-surface.md) page lists each export. This type is not an export of `@jr2/orchestrator`, so a workflow module does not import it by name.

```ts
type FailureInput = { reason: string; detail?: unknown };
```

What a Failure carries: `reason`, text for a person, and `detail`, optional JSON for a machine
reader. The input of `fail()` and the output of a run that ends `failed`.

**Fields**

- `reason`: `string`
- `detail` (optional): `unknown`
