# Stop / Error

End the whole run here, cleanly or with an error.

## Do things in Stop / Error

Add a **Stop / Error** step and choose an **Operation**. Choose the row to see the fields of each.

- [Stop / Error](https://docs.gorunner.io/apps/stop-error#fields-f-stop): Stop (success) · Stop with error

Later steps read a step’s output by its name: see [Use data from earlier steps](https://docs.gorunner.io/build/use-data-from-earlier-steps).

For a step-by-step guide, see [Handle errors](https://docs.gorunner.io/build/handle-errors).

Not in your list? See [When an app isn’t here](https://docs.gorunner.io/apps/when-an-app-isnt-here#q-not-in-list).

## For developers

In the API, which calls apps pieces, Stop / Error is `pieceId: "stop-error"` with `actionId: "stop"`, set by `operation`. [Get an app](https://docs.gorunner.io/api/apps/get-app) returns every field.

It computes from its inputs only (`pure`). See [How versions and side effects work](https://docs.gorunner.io/apps#q-versions).

### Stop / Error › Stop / Error

End the whole run here, gracefully (run completes) or with an error (run fails).

### Stop (success)

- **Message · Optional**: The reason or error message to attach to the stopped run.

### Stop with error

- **Message · Optional**: The reason or error message to attach to the stopped run.
- **Error Content · Optional**: Throw a simple message, or a structured error object whose message/description/error field becomes the error text. Options: Error message, Error object (JSON). Default: Error message.
- **Error Object · Optional**: A JSON object describing the error. Its "message" (else "description", else "error") field is used as the error text. Shows when **Error Content** is **Error object (JSON)**.
- **Error Name · Optional**: Optional error name or type (such as ValidationError). Only used when operation is 'error'.

Source: https://docs.gorunner.io/apps/stop-error
