Fix jsonata error reporting in Inject node

Fixes #5270
This commit is contained in:
Nick O'Leary
2025-10-09 14:50:52 +01:00
parent f60f12cf47
commit 0519b94786

View File

@@ -118,7 +118,7 @@ module.exports = function(RED) {
var exp = RED.util.prepareJSONataExpression(p.v, node);
RED.util.evaluateJSONataExpression(exp, msg, (err, newValue) => {
if (err) {
errors.push(err.toString())
errors.push(RED._("inject.errors.invalid-expr",{error:err.message}))
} else {
RED.util.setMessageProperty(msg,property,newValue,true);
}