mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Update Function catch tests to handle async receive
This commit is contained in:
@@ -282,13 +282,13 @@ module.exports = function(RED) {
|
||||
if (!errorMessage) {
|
||||
errorMessage = err.toString();
|
||||
}
|
||||
this.error(errorMessage, msg);
|
||||
done(errorMessage);
|
||||
}
|
||||
else if (typeof err === "string") {
|
||||
this.error(err, msg);
|
||||
done(err);
|
||||
}
|
||||
else {
|
||||
this.error(JSON.stringify(err), msg);
|
||||
done(JSON.stringify(err));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user