1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #4231 from bvmensvoort/4219-missing-error-logging-for-config-nodes

Show errors and statuses of config nodes in the sidebar when no catch node is available
This commit is contained in:
Nick O'Leary 2023-06-23 16:46:51 +01:00 committed by GitHub
commit 59745fec0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -650,10 +650,9 @@ class Flow {
// Delegate status to any nodes using this config node // Delegate status to any nodes using this config node
for (let userNode in node.users) { for (let userNode in node.users) {
if (node.users.hasOwnProperty(userNode)) { if (node.users.hasOwnProperty(userNode)) {
node.users[userNode]._flow.handleStatus(node,statusMessage,node.users[userNode],true); handled = node.users[userNode]._flow.handleStatus(node,statusMessage,node.users[userNode],true) || handled;
} }
} }
handled = true;
} else { } else {
const candidateNodes = []; const candidateNodes = [];
this.statusNodes.forEach(targetStatusNode => { this.statusNodes.forEach(targetStatusNode => {
@ -737,10 +736,9 @@ class Flow {
// Delegate status to any nodes using this config node // Delegate status to any nodes using this config node
for (let userNode in node.users) { for (let userNode in node.users) {
if (node.users.hasOwnProperty(userNode)) { if (node.users.hasOwnProperty(userNode)) {
node.users[userNode]._flow.handleError(node,logMessage,msg,node.users[userNode]); handled = node.users[userNode]._flow.handleError(node,logMessage,msg,node.users[userNode]) || handled;
} }
} }
handled = true;
} else { } else {
const candidateNodes = []; const candidateNodes = [];
this.catchNodes.forEach(targetCatchNode => { this.catchNodes.forEach(targetCatchNode => {