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

# Debugging Workflows

> Diagnose and fix workflow failures using run history and Catalyst

When a workflow fails, Serval gives you two ways to diagnose the issue: manual inspection through run history, and AI-powered debugging with Catalyst.

***

## Diagnose Failures in Run History

Every workflow run logs step-by-step execution details. Start here to understand what went wrong.

**1. Open the failed run**

Go to **Workflows**, select the workflow, and click the **Runs** tab. Click on the failed run to open its details.

**2. Find the failed step**

The step-by-step breakdown highlights which step failed. Each step shows its status, duration, input, and output.

**3. Review the error**

Check the error message on the failed step. Common errors include:

* **Authentication errors**: Expired or revoked API credentials. Reconnect the application in integrations settings.
* **Not found errors**: The target resource (user, group, etc.) does not exist. Verify input values.
* **Permission errors**: The integration lacks permission for the requested action. Update permissions in the connected application.
* **Rate limiting**: Too many API calls in a short period. Wait and retry.
* **Timeout errors**: The target application took too long to respond. Retry or check application status.

**4. Check the inputs**

Verify the inputs passed to the failed step were valid. Look for incorrect formats, missing required fields, or references to resources that no longer exist.

**5. Fix and retry**

Either re-run with corrected inputs, or fix the workflow logic and publish a new version.

***

## Debug with Catalyst

From any workflow run, click **Investigate in Catalyst** to analyze what happened without digging through logs manually. Catalyst inspects recent runs, identifies which ones failed, and pulls task-level inputs, outputs, and status for each step. It surfaces the exact error and the step that failed, and can suggest fixes.

Describe what you want to investigate, for example:

* "Why did this workflow fail?"
* "What went wrong in the last run?"
* "Show me the output of the failed step"

> [!TIP]
>
> You don't need to copy run IDs or open the Runs tab first. Catalyst searches recent runs automatically based on your question.

***

## Tips for Faster Debugging

* **Check connected applications first.** Many failures trace back to expired credentials or changed permissions in external systems.
* **Compare successful and failed runs.** If the same workflow sometimes succeeds and sometimes fails, compare the inputs between a passing and failing run to isolate the difference.
* **Use the builder agent for pattern detection.** Ask the agent to look across multiple recent failures to spot recurring issues.


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