This flow illustrates the problem. Notice the catch nodes in Link 1 2 and 3.
The workaround I currently have, is to move the catch in Link 5, and pass some sort of error flag to the calling flow.
[
{
"id": "1b2812412742a8cb",
"type": "tab",
"label": "Catch problem",
"disabled": false,
"info": "",
"env": []
},
{
"id": "923b2e9dfb38a316",
"type": "group",
"z": "1b2812412742a8cb",
"name": "Link 2",
"style": {
"label": true
},
"nodes": [
"ccc446f46d45f28a",
"e049a7f95c388573",
"cc2c2103129848f1",
"457baf092058b1ef",
"847da8788ba4fef9",
"76cdbf62ce20c42f"
],
"env": [],
"x": 54,
"y": 539,
"w": 652,
"h": 202
},
{
"id": "088ac7bcd6019e7e",
"type": "group",
"z": "1b2812412742a8cb",
"name": "Link 1",
"style": {
"label": true
},
"nodes": [
"fcc535195485b47a",
"e70f52a0de27f030",
"fcc00b35807e190c",
"b861af9bb527802f",
"d9c76c724121923f",
"33772206bd6af348"
],
"env": [],
"x": 54,
"y": 279,
"w": 652,
"h": 202
},
{
"id": "6c882c9ce5493fb7",
"type": "group",
"z": "1b2812412742a8cb",
"name": "Link 5",
"style": {
"label": true
},
"nodes": [
"9b5cc1d375707c0d",
"3f3f16eff1d51645",
"28638e239fa50a88",
"8c2ca658e077d754"
],
"env": [],
"x": 854,
"y": 579,
"w": 512,
"h": 142
},
{
"id": "9a57e094c0edc125",
"type": "group",
"z": "1b2812412742a8cb",
"name": "Link 3",
"style": {
"label": true
},
"nodes": [
"76408acfa00271f7",
"058a2513932e98a5",
"1152f24689e04667",
"a4e0027cae4884b3",
"23890abad4e3d50d",
"f8e6d968ce1de76b"
],
"env": [],
"x": 54,
"y": 779,
"w": 652,
"h": 202
},
{
"id": "1a008eb88570f6ac",
"type": "inject",
"z": "1b2812412742a8cb",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 80,
"wires": [
[
"b78a02e232b445e4"
]
]
},
{
"id": "9b5cc1d375707c0d",
"type": "link in",
"z": "1b2812412742a8cb",
"g": "6c882c9ce5493fb7",
"name": "Link 5",
"links": [],
"x": 895,
"y": 620,
"wires": [
[
"28638e239fa50a88"
]
]
},
{
"id": "3f3f16eff1d51645",
"type": "link out",
"z": "1b2812412742a8cb",
"g": "6c882c9ce5493fb7",
"name": "",
"mode": "return",
"links": [],
"x": 1275,
"y": 620,
"wires": []
},
{
"id": "b78a02e232b445e4",
"type": "link call",
"z": "1b2812412742a8cb",
"name": "call Link1",
"links": [
"9b5cc1d375707c0d"
],
"timeout": "5",
"x": 340,
"y": 80,
"wires": [
[
"0cb8ce01c44b3f52"
]
]
},
{
"id": "28638e239fa50a88",
"type": "function",
"z": "1b2812412742a8cb",
"g": "6c882c9ce5493fb7",
"name": "throws error",
"func": "throw new Error('Some error');\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1030,
"y": 620,
"wires": [
[
"3f3f16eff1d51645",
"8c2ca658e077d754"
]
]
},
{
"id": "8c2ca658e077d754",
"type": "debug",
"z": "1b2812412742a8cb",
"g": "6c882c9ce5493fb7",
"name": "should not be reached",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1220,
"y": 680,
"wires": []
},
{
"id": "0cb8ce01c44b3f52",
"type": "debug",
"z": "1b2812412742a8cb",
"name": "should always be reached (once per inject)",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 630,
"y": 80,
"wires": []
},
{
"id": "fcc535195485b47a",
"type": "debug",
"z": "1b2812412742a8cb",
"g": "088ac7bcd6019e7e",
"name": "should log the error only for link1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 530,
"y": 440,
"wires": []
},
{
"id": "b008f7d237300147",
"type": "catch",
"z": "1b2812412742a8cb",
"name": "",
"scope": null,
"uncaught": true,
"x": 950,
"y": 100,
"wires": [
[
"7ab3fe35a7f1f578"
]
]
},
{
"id": "e70f52a0de27f030",
"type": "link in",
"z": "1b2812412742a8cb",
"g": "088ac7bcd6019e7e",
"name": "Link 1",
"links": [],
"x": 95,
"y": 380,
"wires": [
[
"b861af9bb527802f"
]
]
},
{
"id": "fcc00b35807e190c",
"type": "link out",
"z": "1b2812412742a8cb",
"g": "088ac7bcd6019e7e",
"name": "",
"mode": "return",
"links": [],
"x": 555,
"y": 380,
"wires": []
},
{
"id": "b861af9bb527802f",
"type": "link call",
"z": "1b2812412742a8cb",
"g": "088ac7bcd6019e7e",
"name": "call link 2",
"links": [
"9b5cc1d375707c0d"
],
"timeout": "5",
"x": 200,
"y": 380,
"wires": [
[
"d9c76c724121923f",
"fcc00b35807e190c"
]
]
},
{
"id": "d9c76c724121923f",
"type": "debug",
"z": "1b2812412742a8cb",
"g": "088ac7bcd6019e7e",
"name": "should not be reached",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 420,
"y": 320,
"wires": []
},
{
"id": "33772206bd6af348",
"type": "catch",
"z": "1b2812412742a8cb",
"g": "088ac7bcd6019e7e",
"name": "",
"scope": [
"b861af9bb527802f"
],
"uncaught": false,
"x": 270,
"y": 440,
"wires": [
[
"fcc00b35807e190c",
"fcc535195485b47a"
]
]
},
{
"id": "7ab3fe35a7f1f578",
"type": "debug",
"z": "1b2812412742a8cb",
"name": "Don't want any here",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1180,
"y": 100,
"wires": []
},
{
"id": "ccc446f46d45f28a",
"type": "debug",
"z": "1b2812412742a8cb",
"g": "923b2e9dfb38a316",
"name": "should log the error only for link2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 530,
"y": 700,
"wires": []
},
{
"id": "e049a7f95c388573",
"type": "link in",
"z": "1b2812412742a8cb",
"g": "923b2e9dfb38a316",
"name": "Link 2",
"links": [],
"x": 95,
"y": 640,
"wires": [
[
"457baf092058b1ef"
]
]
},
{
"id": "cc2c2103129848f1",
"type": "link out",
"z": "1b2812412742a8cb",
"g": "923b2e9dfb38a316",
"name": "",
"mode": "return",
"links": [],
"x": 595,
"y": 640,
"wires": []
},
{
"id": "457baf092058b1ef",
"type": "link call",
"z": "1b2812412742a8cb",
"g": "923b2e9dfb38a316",
"name": "call link 2 bis",
"links": [
"9b5cc1d375707c0d"
],
"timeout": "5",
"x": 210,
"y": 640,
"wires": [
[
"cc2c2103129848f1",
"847da8788ba4fef9"
]
]
},
{
"id": "847da8788ba4fef9",
"type": "debug",
"z": "1b2812412742a8cb",
"g": "923b2e9dfb38a316",
"name": "should not be reached",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 420,
"y": 580,
"wires": []
},
{
"id": "76cdbf62ce20c42f",
"type": "catch",
"z": "1b2812412742a8cb",
"g": "923b2e9dfb38a316",
"name": "",
"scope": [
"457baf092058b1ef",
"28638e239fa50a88"
],
"uncaught": false,
"x": 270,
"y": 700,
"wires": [
[
"cc2c2103129848f1",
"ccc446f46d45f28a"
]
]
},
{
"id": "9370809d651f562e",
"type": "inject",
"z": "1b2812412742a8cb",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 220,
"wires": [
[
"81f70d2f600144a7"
]
]
},
{
"id": "81f70d2f600144a7",
"type": "link call",
"z": "1b2812412742a8cb",
"name": "call Link3",
"links": [
"058a2513932e98a5"
],
"timeout": "5",
"x": 340,
"y": 220,
"wires": [
[
"f7496a368d862bfd"
]
]
},
{
"id": "f7496a368d862bfd",
"type": "debug",
"z": "1b2812412742a8cb",
"name": "should always be reached (once per inject)",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 630,
"y": 220,
"wires": []
},
{
"id": "d7c50ec3590389b6",
"type": "inject",
"z": "1b2812412742a8cb",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 160,
"wires": [
[
"63956fefaf736376"
]
]
},
{
"id": "63956fefaf736376",
"type": "link call",
"z": "1b2812412742a8cb",
"name": "call Link2",
"links": [
"e049a7f95c388573"
],
"timeout": "5",
"x": 340,
"y": 160,
"wires": [
[
"518bd8d386fee80b"
]
]
},
{
"id": "518bd8d386fee80b",
"type": "debug",
"z": "1b2812412742a8cb",
"name": "should always be reached (once per inject)",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 630,
"y": 160,
"wires": []
},
{
"id": "76408acfa00271f7",
"type": "debug",
"z": "1b2812412742a8cb",
"g": "9a57e094c0edc125",
"name": "should log the error only for link3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 530,
"y": 940,
"wires": []
},
{
"id": "058a2513932e98a5",
"type": "link in",
"z": "1b2812412742a8cb",
"g": "9a57e094c0edc125",
"name": "Link 3",
"links": [],
"x": 95,
"y": 880,
"wires": [
[
"a4e0027cae4884b3"
]
]
},
{
"id": "1152f24689e04667",
"type": "link out",
"z": "1b2812412742a8cb",
"g": "9a57e094c0edc125",
"name": "",
"mode": "return",
"links": [],
"x": 595,
"y": 880,
"wires": []
},
{
"id": "a4e0027cae4884b3",
"type": "link call",
"z": "1b2812412742a8cb",
"g": "9a57e094c0edc125",
"name": "call link 2 tris",
"links": [
"9b5cc1d375707c0d"
],
"timeout": "5",
"x": 210,
"y": 880,
"wires": [
[
"1152f24689e04667",
"23890abad4e3d50d"
]
]
},
{
"id": "23890abad4e3d50d",
"type": "debug",
"z": "1b2812412742a8cb",
"g": "9a57e094c0edc125",
"name": "should not be reached",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 420,
"y": 820,
"wires": []
},
{
"id": "f8e6d968ce1de76b",
"type": "catch",
"z": "1b2812412742a8cb",
"g": "9a57e094c0edc125",
"name": "",
"scope": [
"28638e239fa50a88",
"a4e0027cae4884b3"
],
"uncaught": false,
"x": 270,
"y": 940,
"wires": [
[
"1152f24689e04667",
"76408acfa00271f7"
]
]
}
]