Closed julpat closed 1 year ago
When did you test this? Numeric enums issue should be already resolved: https://github.com/superfaceai/cli/issues/324.
Yes, it's a bit older (19.7.), I got into this because of 500 errors in Air/Brain. Enums are fixed, but are we sure, that only valid profiles will be generated/stored? Is there some check in the authoring process?
We have checks on multiple levels - in Engine each AST node is checked for it's kind and whole AST is checked with assert (which validates it agains schema). On the CLI side we compile profile source to AST - validate it once again.
So as long as Schema is correct we are good, I plan to revisit this as soon as we have new Parser (see my question in Slack).
Ok, thanks for the confirmation. Let's consider this resolved. I will add a fix to Air to not fail with 500 errors for already created Comlinks with syntax a error.
Expected Behavior
The generated profile will not contain syntax errors.
Current Behavior
From time to time generated profile contains syntax errors. These files are stored in DB and listed in My Comlinks at
superface.ai/app
. When a user is trying to see the detail of the Comlink it ends with a 500 error on trying to parse that file.Possible Solution
Do not store generated profiles with syntax errors eventually add syntax check as part of generating process and do not allow it to continue if the file is broken -> generate profiles only without syntax errors.
Steps to Reproduce
Did not find steps to reproduce this every time, but one case is when the profile contains
enum
definition as in the attached profile for a pipedrive provider with prompt: create organization