# Pipeline Error Handling

## Pipeline Error Handling

When a major failure occurs in one of the transforms, the pipeline is notified and halts all active operations. This is fine in most cases, pipeline failures are typically handled in the parent workflow (check the [Create a workflow](/data-shaper-1.21/knowing-the-data-shaper-designer/workflows/create-workflow.md) page to learn about error hops in workflows). In some cases however, there are errors you’ll want to handle gracefully without halting the entire pipeline.

In these cases where you don’t want your pipeline to fail when an error occurs, Hop pipelines support error handling on transforms and hops.

When you create a hop from a transform that supports error handling to another transform, the Hop pipeline editor will ask you if you want to create a hop for the main output or for the error handling of your transform.

<figure><img src="/files/wsPeh2jPBbofEFWZmcnq" alt="" width="375"><figcaption></figcaption></figure>

If you choose to create an error handling transform, the hop will be shown in red instead of the default black (or white, if you’re in dark mode).

<figure><img src="/files/O5AAsD6jvlDq8mJAlPkv" alt="" width="375"><figcaption></figcaption></figure>

For each transform that supports error handling, there are a number of options you can configure. Click on the transform icon to open the context dialog and selected the 'Error handling' icon.

<figure><img src="/files/5T2V3yKEqh0Y1RA4Ebnd" alt="" width="375"><figcaption></figcaption></figure>

In the error handling dialog, you can specify additional fields that will be added to your pipeline stream.

<figure><img src="/files/m2z6xucZS81LIchiLs7p" alt="" width="375"><figcaption></figcaption></figure>

The available options are:

| option                                           | description                                                                                                                                                                                                             |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| target transform                                 | the transform that will receive the error information                                                                                                                                                                   |
| enable the error handling                        | enable error handling from this transform                                                                                                                                                                               |
| nr of errors fieldname                           | the number of errors that occurred in the pipeline                                                                                                                                                                      |
| error description fieldname                      | fieldname to contain the error description                                                                                                                                                                              |
| error fields fieldname                           | the pipeline field where an error occurred                                                                                                                                                                              |
| error codes fieldname                            | the error code for the error that occurred                                                                                                                                                                              |
| max nr errors allowed                            | max number of errors allowed before the pipeline fails.                                                                                                                                                                 |
| max % errors allowed (empty = 100%)              | the percentage of errors that is allowed before the pipeline fails                                                                                                                                                      |
| min nr of rows to read before doing % evaluation | number of rows to read before doing the percentage evaluation. These rows will be taken into account in the evaluation, but the evaluation will only be performed once the specified number of rows has been processed. |

An example output when trying to cast an invalid date string to a date is shown below.

<figure><img src="/files/E2zzoQ2FQy8o4YuvG49Y" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/errorhandling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
