# Process flow run failures

## Introduction

A process flow may fail for a number of reasons - for example, if a mapped field in the source/destination system has changed unexpectedly; if authentication credentials for a connection have expired, or if shape configuration is incorrect.

You might notice the failure whilst observing [real-time logs as a flow is run manually](/product-documentation/process-flows/error-reporting-and-exception-handling/real-time-run-logs.md), or you might have received an [email alert](/product-documentation/process-flows/error-reporting-and-exception-handling/email-notifications-for-failed-process-flow-runs.md) advising that an [auto-triggered](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape.md) process flow failed to complete.&#x20;

This guide summarises what to do in the event that a process flow fails.

{% hint style="info" %}
When a process runs and fails, it's re-tried three times automatically before being stopped and logged as a failure.
{% endhint %}

## Handling a process flow run failure

**Step 1**\
Check the [run logs](/product-documentation/process-flows/error-reporting-and-exception-handling/run-logs-and-queue.md) for the process flow. Here you'll find detailed information associated with each step in the flow, so you can identify which shape caused the flow to fail.

{% hint style="info" %}
If a process flow has failed at a [connection](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) step, consider the following:

* Are the **authentication credentials** provided for the selected connector instance still current? If you need to update credentials, you can [edit the instance](/product-documentation/connectors-and-instances/working-with-instances/updating-an-instance.md).&#x20;
* Are all **connection shape settings** correct? For example, could the issue be related to a variable or parameter (either missing or defined incorrectly)?&#x20;
* Is the **third-party system** associated with your connector instance experiencing any issues?
* Is the connector instance associated with a custom connector that was built by someone in your own organisation using [connector builder](/product-documentation/developer-hub/connector-builder.md)? If yes, check that the **data schema** for the endpoint selected in your [connection](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) step is valid.
  {% endhint %}

{% hint style="warning" %}
If you change credentials for an instance, those credentials will be updated in all process flows where that instance is defined.&#x20;
{% endhint %}

**Step 2**\
If the cause of the failure isn't obvious from the log details, [check the payloads](/product-documentation/process-flows/error-reporting-and-exception-handling/run-logs-and-queue.md#view-logs) for each step in the flow to see if they are as expected. Payloads are available from the [run logs page](/product-documentation/process-flows/error-reporting-and-exception-handling/run-logs-and-queue.md), via the **view logs** option for each step:

<figure><img src="/files/w03xLmZpdqLCLvWV7EZj" alt=""><figcaption></figcaption></figure>

**Step 3**\
If you've found the cause of the failure from the logs and need to update the process flow, access the process flow in question and make the required changes. \
\
**OR**\
\
If you haven't found the issue and need to investigate further, access the process flow in question and check the settings for each shape.&#x20;

**Step 4**\
Having updated the process flow, you may wish to [run it manually](/product-documentation/process-flows/managing-process-flows/initialising-a-process-flow-manually.md) to check that the issue is resolved or wait for the next scheduled run.


---

# 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://doc.wearepatchworks.com/product-documentation/process-flows/troubleshooting-process-flows/process-flow-run-failures.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.
