Handling batch failures
When Records fail in a batch, inspect the results, fix the Flow or Records, and run the batch again.
Identify failures
A batch runs a Flow once for each Record of the selected type. For batch setup and monitoring, see Running flows in batch.
To find a failed Record, open the batch results and follow these steps:
- Open the batch results for your run.
- Review the status badge and error preview for each Record row.
- On a failed row, click View Details.
The detail panel shows the Record metadata, output, per-step results, and error for that execution. A Record that finishes with failed steps appears as Completed with errors with a failed-step count.
Common failure types
The batch results include the error reported by the failing step or provider. Use the following table to choose a fix.
Rerun a batch after a fix
The dashboard does not provide a separate control to retry only failed Records. A batch retries a Record execution that throws before it marks the row as failed, but it does not retry a Record whose Flow completes with failed steps.
To rerun the batch for the same Record type, follow these steps:
- Fix the Flow logic or correct the affected Records on the Records page.
- In the Flow editor, click Run flow.
- Select the Batch tab.
- Select the same Record Type.
- Click Run on Records.
To publish the Flow change, click Publish after you test the batch.
Handle failures inside a Flow
Return a structured result from a Run Code step instead of throwing on invalid input. In this example, raw_data contains JSON text from an earlier step:
Use a Conditional Logic step to branch on the success field and route invalid Records to an error path. On prompt steps, select Use fallbacks to retry the same model, use a different model, or return a fixed message when the configured trigger fires.
Debug an individual failure
To investigate one failed Record, follow these steps:
- Open View Details for that row in the batch results.
- Review the Record metadata, output, per-step results, and error.
- Open Logs and select the execution to inspect its timeline and step details.
For filtering and inspecting execution history, see Working with logs.
Prevent failures
Use these practices before you scale a batch:
- Validate inputs: Add validation or default handling near the start of the Flow.
- Handle step errors: Use
try/catchin Run Code steps and branch with Conditional Logic. - Configure prompt fallbacks: Add a different model for rate limits and slow model calls.
- Test edge cases: Run a small batch against Records with missing or malformed data.
- Review limits: Check provider rate limits, your spend cap, and available credit before starting a large batch.
Next steps
Continue with these guides:
- Running flows in batch: learn to start and monitor a batch.
- Debugging flows: inspect Flow steps and execution errors.
- Using prompt steps: configure prompt error handling and fallbacks.
- Automating batch processing: schedule batches with Schedules.