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

[TRACKER] More useful error messages #307

Open
topher-lo opened this issue Aug 14, 2024 · 4 comments
Open

[TRACKER] More useful error messages #307

topher-lo opened this issue Aug 14, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers tracker Issues to track groups of issues

Comments

@topher-lo
Copy link
Contributor

topher-lo commented Aug 14, 2024

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
@topher-lo topher-lo added enhancement New feature or request good first issue Good for newcomers tracker Issues to track groups of issues labels Aug 14, 2024
@bjackson2001
Copy link

Committing Empty Workflows - Error message on UI reads "Error committing Workflow"

@topher-lo
Copy link
Contributor Author

Screenshot 2024-08-21 at 3 31 53 PM

^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

@daryllimyt daryllimyt self-assigned this Aug 22, 2024
@daryllimyt
Copy link
Contributor

Screenshot 2024-08-21 at 3 31 53 PM ^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.

@daryllimyt
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers tracker Issues to track groups of issues
Projects
None yet
Development

No branches or pull requests

3 participants