# Catch-all in group and order of insertion

**URL:** <https://discourse.nodered.org/t/catch-all-in-group-and-order-of-insertion/101178>\
**Category:** Core Development\
**Tags:** bug\
**Created:** [2 June 2026 18:07 UTC](https://discourse.nodered.org/t/catch-all-in-group-and-order-of-insertion/101178 "2026-06-02T18:07:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregorius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gregorius/32/73816_2.png) [@gregorius](https://discourse.nodered.org/u/gregorius)\
**Post date:** [2 June 2026 18:07 UTC](https://discourse.nodered.org/t/catch-all-in-group-and-order-of-insertion/101178/1 "2026-06-02T18:07:33Z")

</div>

Hi There,

Yippee another nichy edge-case:

![Screen Recording 2026-06-02 at 19.53.01-2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/7/97ad1c3bca7f16b71e148b6c5d19da795a86bf17.gif)

What is happening?

The function nodes are generating exceptions and the catch 1 nodes are receiving those exceptions respectively (i.e. the `catch: 1` at the top catches the `function 22` errors and the `catch: 1` at the bottom catches the error of `function 1`).

The catch all in group node has the "Ignore errors handled by other Catch nodes" set in both cases meaning that since the exception is actually being handled by the `catch: 1` node, then it shouldn't be receiving the exceptions. This is happening in the top group but not in the bottom group - why?

Ordering.

The bottom group was created with the catch-all node being the first exception handler in the group, the `catch: 1` (for that group) was added _after_ the catch-all node. In the top group, the order was reversed: I added the `catch: 1` node to the group _before_ adding the catch-all node.

As I said, this is an edge case that can be fixed by re-adding the catch-all node to a group once all catch-1 nodes have been added. Just have to remember to do this every time a catch-1 node is added to a group ....

I don't know whether the flow attached will maintain the error when imported but if someone can confirm, that would be great.

Tested using NR 4.0.9

```flows
[{"id":"eb24c92ce5621760","type":"tab","label":"[catch] catch all in group except those handler elsewhere","disabled":false,"info":"","env":[]},{"id":"5ea70f167d125afc","type":"group","z":"eb24c92ce5621760","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["a703aaba38a383b9","3bf38b22cdb0fa95","98023732b523561f","e846b7ff5f8f635f","350a6ead2834e85e","4897c7a025a41050"],"x":407.85716247558594,"y":525.8214364051819,"w":736.1428375244141,"h":271.46425199508667},{"id":"5ba8388e749dfa77","type":"group","z":"eb24c92ce5621760","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["023f10b500483121","bdf2557e7fc7b76f","a884ccb2f0fe0dad","76653802ad661faa","4baaef89afb5cb20","13095e53a4e7d7fc"],"x":402,"y":855,"w":773,"h":227},{"id":"a703aaba38a383b9","type":"function","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"function 22","func":"node.wrnd(\"dd\")\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1012.4285736083984,"y":756.2856884002686,"wires":[[]]},{"id":"3bf38b22cdb0fa95","type":"inject","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":605.2857666015625,"y":756.2856884002686,"wires":[["a703aaba38a383b9"]]},{"id":"98023732b523561f","type":"catch","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"","scope":["a703aaba38a383b9"],"uncaught":false,"x":1012.4285736083984,"y":703.4285936355591,"wires":[["350a6ead2834e85e"]]},{"id":"e846b7ff5f8f635f","type":"catch","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"catch all in group except those already dealt with","scope":"group","uncaught":true,"x":613.8571624755859,"y":566.8214364051819,"wires":[["4897c7a025a41050"]]},{"id":"023f10b500483121","type":"catch","z":"eb24c92ce5621760","g":"5ba8388e749dfa77","name":"catch all in group except those already dealt with","scope":"group","uncaught":true,"x":608,"y":908,"wires":[["bdf2557e7fc7b76f"]]},{"id":"bdf2557e7fc7b76f","type":"debug","z":"eb24c92ce5621760","g":"5ba8388e749dfa77","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":947,"y":896,"wires":[]},{"id":"a884ccb2f0fe0dad","type":"function","z":"eb24c92ce5621760","g":"5ba8388e749dfa77","name":"function 1","func":"node.wrnd(\"dd\")\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1035.999984741211,"y":1041,"wires":[[]]},{"id":"76653802ad661faa","type":"inject","z":"eb24c92ce5621760","g":"5ba8388e749dfa77","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":628.857177734375,"y":1041,"wires":[["a884ccb2f0fe0dad"]]},{"id":"4baaef89afb5cb20","type":"catch","z":"eb24c92ce5621760","g":"5ba8388e749dfa77","name":"","scope":["a884ccb2f0fe0dad"],"uncaught":false,"x":938,"y":1000,"wires":[["13095e53a4e7d7fc"]]},{"id":"13095e53a4e7d7fc","type":"debug","z":"eb24c92ce5621760","g":"5ba8388e749dfa77","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1069,"y":935,"wires":[]},{"id":"350a6ead2834e85e","type":"debug","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1038,"y":636,"wires":[]},{"id":"4897c7a025a41050","type":"debug","z":"eb24c92ce5621760","g":"5ea70f167d125afc","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":962,"y":567,"wires":[]}]

```

---

<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:** [1 August 2026 18:08 UTC](https://discourse.nodered.org/t/catch-all-in-group-and-order-of-insertion/101178/2 "2026-08-01T18:08:02Z")

</div>

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