tracecat icon indicating copy to clipboard operation
tracecat copied to clipboard

[TRACKER] More useful error messages

Open topher-lo opened this issue 1 year ago • 4 comments

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 avatar Aug 14 '24 16:08 topher-lo

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

bjackson2001 avatar Aug 15 '24 11:08 bjackson2001

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

topher-lo avatar Aug 21 '24 19:08 topher-lo

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 avatar Aug 25 '24 23:08 daryllimyt

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.

daryllimyt avatar Aug 25 '24 23:08 daryllimyt

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

topher-lo avatar Feb 17 '25 19:02 topher-lo