Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VRL Playground does nothing when invalid JSON is in event field #17445

Closed
ajgajg1134 opened this issue May 19, 2023 · 0 comments · Fixed by #17826
Closed

VRL Playground does nothing when invalid JSON is in event field #17445

ajgajg1134 opened this issue May 19, 2023 · 0 comments · Fixed by #17826
Labels
type: bug A code related bug. vrl: playground Changes to the VRL Web Playground.

Comments

@ajgajg1134
Copy link

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

When playing in the VRL playground, if one puts invalid JSON and hits run code nothing happens instead an error is printed in the javascript console like Uncaught SyntaxError: Unexpected non-whitespace character after JSON . It would be preferred to surface this error to the user to make it obvious their code is not running because they have an invalid event.

Configuration

No response

Version

N/A

Debug Output

No response

Example Data

example invalid event:

{
    "duration": 10fefe
}

Additional Context

No response

References

No response

@ajgajg1134 ajgajg1134 added the type: bug A code related bug. label May 19, 2023
@jszwedko jszwedko added the vrl: playground Changes to the VRL Web Playground. label May 19, 2023
github-merge-queue bot pushed a commit that referenced this issue Jul 5, 2023
…17826)

<!--
**Your PR title must conform to the conventional commit spec!**

  <type>(<scope>)!: <description>

  * `type` = chore, enhancement, feat, fix, docs
  * `!` = OPTIONAL: signals a breaking change
* `scope` = Optional when `type` is "chore" or "docs", available scopes
https://github.com/vectordotdev/vector/blob/master/.github/semantic.yml#L20
  * `description` = short description of the change

Examples:

  * enhancement(file source): Add `sort` option to sort discovered files
  * feat(new source): Initial `statsd` source
  * fix(file source): Fix a bug discovering new files
  * chore(external docs): Clarify `batch_size` option
-->

closes: #17445 

Note that `wasm-pack build` modified some previously generated files.
Created #17827.

Example:

![image](https://github.com/vectordotdev/vector/assets/1138161/4fd0b825-8e1b-4466-9c90-5ab8705ad0e8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug. vrl: playground Changes to the VRL Web Playground.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants