[ML] Catching error for syntax error in job wizard editor (#119457) (#119616)

Co-authored-by: James Gowdy <jgowdy@elastic.co>
This commit is contained in:
Kibana Machine 2021-11-24 10:46:21 -05:00 committed by GitHub
parent 7a9749722a
commit 9ff581ea16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,12 @@ export const MLJobEditor: FC<MlJobEditorProps> = ({
onChange = () => {},
}) => {
if (mode === ML_EDITOR_MODE.XJSON) {
value = expandLiteralStrings(value);
try {
value = expandLiteralStrings(value);
} catch (error) {
// eslint-disable-next-line no-console
console.error(error);
}
}
return (