Skip to content

Commit 1519500

Browse files
committed
fix: catch exceptions
1 parent 28e80cf commit 1519500

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

src/js/workflows/saveWorkflow.js

+18-5
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,25 @@ export const saveWorkflow = async (jsonGraph, installation = false) => {
4444
Name: paramName,
4545
Value
4646
});
47-
_inputs.parameters[paramName] = DivaServices.parseParameterValue(
48-
Value,
49-
paramType
50-
);
47+
48+
try {
49+
_inputs.parameters[paramName] = DivaServices.parseParameterValue(
50+
Value,
51+
paramType
52+
);
53+
} catch (e) {
54+
console.log(e);
55+
_inputs.parameters[paramName] = Value;
56+
}
57+
}
58+
59+
let validity = true;
60+
try {
61+
validity = Validation.checkValue(Value, paramType, values);
62+
} catch (e) {
63+
console.log(e);
64+
validity = false;
5165
}
52-
const validity = Validation.checkValue(Value, paramType, values);
5366
if (!validity) {
5467
log.push({
5568
value: Value,

0 commit comments

Comments
 (0)