# Run component when job fails at any step

**URL:** <https://matillioncommunity.discourse.group/t/run-component-when-job-fails-at-any-step/1490>\
**Category:** Matillion ETL\
**Created:** [October 6, 2021, 4:12am UTC](https://matillioncommunity.discourse.group/t/run-component-when-job-fails-at-any-step/1490 "2021-10-06T04:12:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Singularity](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Singularity](https://matillioncommunity.discourse.group/u/Singularity)\
**Post date:** [October 6, 2021, 4:12am UTC](https://matillioncommunity.discourse.group/t/run-component-when-job-fails-at-any-step/1490/1 "2021-10-06T04:12:11Z")

</div>

Hi - I have a job where I need to send a curl request to a URL if a job fails specifically indicating that it has failed. The job is comprised of multiple components that could all potentially fail. When a job fails at a given component, will the failure flow through all subsequent components after that failed component such that I can place a single "BASH Script" component at the end of my job on the failure outcome that will trigger the curl request if there is a failure?

---

<div class="post-metadata">

**Author:** ![Michael](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael](https://matillioncommunity.discourse.group/u/Michael)\
**Post date:** [October 6, 2021, 6:33am UTC](https://matillioncommunity.discourse.group/t/run-component-when-job-fails-at-any-step/1490/2 "2021-10-06T06:33:32Z")

</div>

I think there is currently no way to catch \*any\* error that happens during job execution and execute a bash scipt on error. You have to add components for error handling explicitly.

&nbsp;

Maybe you could try the "Manage Error Reporting" Feature (https://documentation.matillion.com/docs/4191881) which is pretty much what you need but it can only call Webhooks. But if you manage to setup a webhook on your end which then calls a script if it is triggered, this could be a workaround.

&nbsp;

If that helps and you find a way to handle all errors, please share your solution with the community.

---

<div class="post-metadata">

**Author:** ![Singularity](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Singularity](https://matillioncommunity.discourse.group/u/Singularity)\
**Post date:** [October 6, 2021, 4:27pm UTC](https://matillioncommunity.discourse.group/t/run-component-when-job-fails-at-any-step/1490/3 "2021-10-06T16:27:13Z")

</div>

[@Michael](https://matillioncommunity.discourse.group/u/Michael)​ thanks for that feedback, that error reporting looks promising and I think could be a good way to handle, albeit requiring another service.
