Skip to content

Commit

Permalink
better error message and manually edit generated files (newlines at e…
Browse files Browse the repository at this point in the history
…of are required)
  • Loading branch information
pront committed Jun 30, 2023
1 parent 1a3aafa commit cb87dc3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/vector-vrl/web-playground/public/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*
vector_vrl_web_playground**
6 changes: 3 additions & 3 deletions lib/vector-vrl/web-playground/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ export class VrlWebPlayground {
};
}
catch (error) {
console.error(`Could not parse input JSON: ${error.stack}`);
console.error(error);
return {
program: this.programEditor.getValue(),
event: null,
is_jsonl: false,
error,
error: `Could not parse JSON event:\n${editorValue}`,
};
}
return state;
Expand Down Expand Up @@ -186,7 +186,7 @@ export class VrlWebPlayground {
}
if (input.error) {
this.disableJsonLinting();
this.outputEditor.setValue(input.error.stack);
this.outputEditor.setValue(input.error);
return input;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/vector-vrl/web-playground/public/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"module": "vector_vrl_web_playground.js",
"types": "vector_vrl_web_playground.d.ts",
"sideEffects": false
}
}

0 comments on commit cb87dc3

Please sign in to comment.