UI: Added catch error when parsing incorrect debug message in rule node

This commit is contained in:
Vladyslav_Prykhodko 2023-04-21 11:06:04 +03:00
parent a0c370079e
commit 0ee7dff7b4

View File

@ -46,10 +46,14 @@ export class NodeScriptTestService {
let msgType: string;
if (debugIn) {
if (debugIn.data) {
msg = JSON.parse(debugIn.data);
try {
msg = JSON.parse(debugIn.data);
} catch (e) {}
}
if (debugIn.metadata) {
metadata = JSON.parse(debugIn.metadata);
try {
metadata = JSON.parse(debugIn.metadata);
} catch (e) {}
}
msgType = debugIn.msgType;
}