> For the complete documentation index, see [llms.txt](https://docs.laravel-haystack.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.laravel-haystack.dev/next-up/allowing-failed-jobs.md).

# Allowing Failed Jobs

The default behaviour of Haystack is to cancel the Haystack if one of the jobs in the chain fails. If you would like to continue processing the rest of the Haystack even if there was a failure, use the `allowFailures` option when building a Haystack.

```php
<?php

$haystack = Haystack::build()
   ->addJob(new RecordPodcast) 
   ->addJob(new ProcessPodcast)
   ->allowFailures()
   ->dispatch();
```

{% hint style="info" %}
When jobs fail they will be added to your `failed_jobs` database table.
{% endhint %}
