From 73d8fa11e957d13c8fdc6d11fe02c5d30b0cbf15 Mon Sep 17 00:00:00 2001 From: Pietro Brenna Date: Wed, 24 Nov 2021 10:59:37 +0100 Subject: [PATCH] validaz --- red/s7/s7-briq.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/red/s7/s7-briq.js b/red/s7/s7-briq.js index 230b9bb..fac5876 100644 --- a/red/s7/s7-briq.js +++ b/red/s7/s7-briq.js @@ -185,7 +185,7 @@ module.exports = function (RED) { write_msg.assert(msg); } catch (e) { let errors = write_msg.validate(msg); - node.error("Msg non valido: " + errors.map(x => x.path + ": " + x.error).join("\n")); + node.error("Msg non valido: " + errors.map(x => x.path + ": " + x.message).join("\n")); return; } s7node_from_plc(msg.plc).then(s7conn => { @@ -212,7 +212,7 @@ module.exports = function (RED) { read_msg.assert(msg); } catch (e) { let errors = read_msg.validate(msg); - node.error("Msg " + JSON.stringify(msg) + " non valido: " + errors.map(x => x.path + ": " + x.error).join("\n")); + node.error("Msg " + JSON.stringify(msg) + " non valido: " + errors.map(x => x.path + ": " + x.message).join("\n")); return; } s7node_from_plc(msg.plc).then(s7conn => {