> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nika.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# recover

> Contract, placement, related fields and source examples for this Nika YAML field.

[Language reference](https://docs.nika.sh/reference/language/overview.md) / `recover`

## Meaning and placement

### onError

Recovery output · a `${{ }}` ref OR a literal (merges the former fallback/value per spec/05-errors.md).

| Property | Declaration |
| - | - |
| Requirement | Optional in this object |
| Schema location | `/$defs/onError/properties/recover` |

**In the same object:** [on\_codes](https://docs.nika.sh/reference/language/words/on_codes.md) · [skip](https://docs.nika.sh/reference/language/words/skip.md)

[Schema source (use the pointer above)](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/schemas/workflow.schema.json)

## In a source template

Excerpt from `templates/api-upload-and-create.nika`, source lines 93–99. This is a fragment, not a runnable workflow.

```yaml illustration theme={"system"}
      # projects, so `outputs.result` has the same shape on both paths. Delete
      # the block once the key is wired, so an unset key is loud as well.
      on_codes: [NIKA-VAR-001]
      recover: { id: "rehearsal-0001", url: "https://app.example.com/items/rehearsal-0001" }

outputs:
  result: ${{ tasks.create.output }}   # SLOT: the callable contract
```

### Templates containing this field

| Template | Source |
| - | - |
| `templates/api-upload-and-create.nika` | [Line 96](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/api-upload-and-create.nika#L96) |
| `templates/chain.nika` | [Line 60](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/chain.nika#L60) |
| `templates/docker-report.nika` | [Line 57](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/docker-report.nika#L57) |
| `templates/etl-state.nika` | [Line 82](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/etl-state.nika#L82) |
| `templates/fanout.nika` | [Line 102](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/fanout.nika#L102) |
| `templates/gate-and-act.nika` | [Line 64](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/gate-and-act.nika#L64) |
| `templates/human-gated-ship.nika` | [Line 106](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/human-gated-ship.nika#L106) |
| `templates/media-asset-pack.nika` | [Line 85](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/media-asset-pack.nika#L85) |
| `templates/recover-optional-file.nika` | [Line 38](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/recover-optional-file.nika#L38) |
| `templates/website-brief.nika` | [Line 57](https://github.com/supernovae-st/nika-spec/blob/5c40ba456c53a4ab663a949d44003078e161305d/templates/website-brief.nika#L57) |

These are literal key occurrences in the source files, not an execution or conformance claim. [How to instantiate a template](https://docs.nika.sh/guides/templates.md).

## Contract and implementation

This page projects the named specification revision. Check [released engine status](https://docs.nika.sh/reference/status.md) and [the validation workflow](https://docs.nika.sh/guides/agent-authoring.md) before running a file. An optional field is not evidence that every engine supports every value.

Canonical identity: `language:word:recover`. Spec revision: [`5c40ba456c53`](https://github.com/supernovae-st/nika-spec/tree/5c40ba456c53a4ab663a949d44003078e161305d).

[How documentation stays connected](https://docs.nika.sh/reference/knowledge-system.md).


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