# Multiple catch nodes

**URL:** <https://discourse.nodered.org/t/multiple-catch-nodes/55437>\
**Category:** General\
**Tags:** http-request\
**Created:** [19 December 2021 15:39 UTC](https://discourse.nodered.org/t/multiple-catch-nodes/55437 "2021-12-19T15:39:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mamonetti](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Mamonetti](https://discourse.nodered.org/u/Mamonetti)\
**Post date:** [19 December 2021 15:39 UTC](https://discourse.nodered.org/t/multiple-catch-nodes/55437/1 "2021-12-19T15:39:56Z")

</div>

![screenshot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/e/6ee63bf26b9597b098de75d292eb5aeff0569136.jpeg)

I have a flow similar to the attached one where I want to keep an infinite loop doing some stuff related to HTTP requests. It's important to notice that there's just one inject operation at start.

What happens if you have one catch node for a specific node (HTTP request) and a global catch? I mean, which one of them would catch an exception if there was one in that node?

An talking about the HTTP request node, what happens when there's an exception/error inside of it such a connection rejected? Does it output anything if there's a catch node observing it either locally (the lowest catch node) or globaly? Does it output anything if there's no catch node observing it and there's an exception/error?

Regards

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [19 December 2021 15:44 UTC](https://discourse.nodered.org/t/multiple-catch-nodes/55437/2 "2021-12-19T15:44:30Z")

</div>

> [@Mamonetti](#):
>
> What happens if you have one catch node for a specific node (HTTP request) and a global catch? I mean, which one of them would catch an exception if there was one in that node?

That should be easy enough to test for yourself.

However, You likely want the 1st catch node set to catch uncaught exceptions

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/3/33a5246dfe8d90360ca491b5c9c877fd572361bb.png)

---

<div class="post-metadata">

**Author:** ![Mamonetti](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Mamonetti](https://discourse.nodered.org/u/Mamonetti)\
**Post date:** [19 December 2021 17:40 UTC](https://discourse.nodered.org/t/multiple-catch-nodes/55437/3 "2021-12-19T17:40:30Z")

</div>

So this means the exception will be triggered and node-red will look for all the potential catch nodes in order to decide who's going to get control of the flow?

If that's it, the checkbox you mentioned would do the trick, but what if for some reason you have multiple nodes that could actually handle the exception? I guess node-red would choose only one following some criteria but just one, correct?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 December 2021 18:17 UTC](https://discourse.nodered.org/t/multiple-catch-nodes/55437/4 "2021-12-19T18:17:28Z")

</div>

> [@Mamonetti](#):
>
> I guess node-red would choose only one following some criteria but just one, correct?

No. All eligible catch nodes will get triggered.

---

<div class="post-metadata">

**Author:** ![Mamonetti](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Mamonetti](https://discourse.nodered.org/u/Mamonetti)\
**Post date:** [20 December 2021 09:58 UTC](https://discourse.nodered.org/t/multiple-catch-nodes/55437/5 "2021-12-20T09:58:23Z")

</div>

Ok, thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 February 2022 09:59 UTC](https://discourse.nodered.org/t/multiple-catch-nodes/55437/6 "2022-02-18T09:59:06Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
