[TRACKER] More useful error messages
NOTE:
For users encountering poor UX related to Tracecat errors, please kindly add your error message to this issue. We aim to have a <24 hour turnover for every insufficiently useful error message.
Problem
We designed the parser from first principles that fits according to parser / complier / arithmetic theory. Therefore existing error messages e.g.
Failed to parse expression: Unexpected end-of-input. Expected one of: \n\t* IF\n\t* OPERATOR\n\t* RPAR\n\t* COMMA\n'
areoften cryptic and do no provide sufficient next steps / information to the user i.e. good for SWEs / development / unit tests but not great for the end user.
Solution
- Do an audit of all error messages. Make sure we reraise exceptions with a user friendly explanation of the error.
- Make sure every exception comes with concrete next-steps on how to resolve the issue.
- Next steps must provide concrete examples, links to docs, references to the UI
Committing Empty Workflows - Error message on UI reads "Error committing Workflow"
^Non-informative error when JSONPath KeyError. For example:
This errored: ${{ ACTIONS.analyze_url.result.data.last_analysis_stats }}
Correct usage: ${{ ACTIONS.analyze_url.result.data.attributes.last_analysis_stats }}
^ missing .attributes
^Non-informative error when JSONPath KeyError. For example:
This errored: ${{ ACTIONS.analyze_url.result.data.last_analysis_stats }} Correct usage: ${{ ACTIONS.analyze_url.result.data.attributes.last_analysis_stats }}^ missing
.attributes
This issue should be fixed in #353. It's actually a known issue with loguru.
Committing Empty Workflows - Error message on UI reads "Error committing Workflow"
This has also been addressed in a previous PR. Will link if I find it.
Users looking to report not-so-helpful error messages are encouraged to open up a new issue with screenshots and an issue description!
Significant progress has been made. I think we're now in a good enough position where users can debug their workflows without too much eye sore.
- #802
- #781
- #793 (biggest update is the compat views run directly in the left hand side of the workflow builder)
- #838
More improvements still needed (and coming before the March 24th release):
- Make Pydantic validation errors less verbose for actions
- Reduced actions context views in the workflow views tab
^Non-informative error when JSONPath KeyError. For example: