Add syntax validation for payload formatters #3442
Labels
c/console
This is related to the Console
c/identity server
This is related to the Identity Server
duplicate
This issue or pull request already exists
technical debt
Not necessarily broken, but could be done better/cleaner
ui/cli
This is related to ttn-lw-cli
Summary
We currently allow any string value to be set as payload formatter. This makes it hard for users to find out about basic syntax issues in their payload formatter scripts.
Why do we need this?
What is already there? What do you see now?
In the console we have some basic syntax highlighting that notifies about issues in the script, however
What is missing? What do you want to see?
Environment
v3.10.0
How do you propose to implement this?
Haven't worked on this but it's likely not a big issue to pipe the error output of the interpreter to the API response.
How do you propose to test this?
Unit tests.
Can you do this yourself and submit a Pull Request?
@johanstokking (please reassign as appropriate)
The text was updated successfully, but these errors were encountered: