-
Notifications
You must be signed in to change notification settings - Fork 173
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
Error messages #1165
Error messages #1165
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I had one comment about maybe adding a link to documentation in one spot, but nothing blocking
, "networking conditions between the CLI and the FOSSA API." | ||
, "" | ||
, "To reduce the likelihood of this error, ensure that only data you really" | ||
, "need FOSSA to scan is being uploaded." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we link to docs about inclusion / exclusion here, or other documentation about how to reduce the data you send?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 second this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to, but:
- At this point without larger refactoring, we're not actually certain that the user is even specifying
vendored-dependencies
, so linking to it seems like it may be confusing as often as it may be helpful. - We don't have a great way of testing these links to ensure they're durable.
I think we'd ideally link to the documentation like this, but I'd like to consider it out of scope for this PR.
details :: Doc AnsiStyle | ||
details = | ||
vsep | ||
[ "Attempted to run the command '" <> prettyCommand cmdFailureCmd <> "'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this! It explains everything so much better and gives much more actionable info
Would this be able to show that the CLI errored out on not using a push only token? I recall receiving this networking error by using a full access token, but I wouldn't say it's a true networking error 🤔 Overall I love this new change! 🚀 ✨ ✨ ✨
|
I think the key is that this can't possibly be an issue raised due to an API key error; during the course of this I tested it and we return API key errors very differently. |
Overview
During my onduty cycle I've noticed several instances where the error messages reported when running external commands were confusing. This PR is an attempt to make them nicer and more useful.
Additionally, I've added special handling to a couple HTTP error cases:
Example error text for 403:
Example error text for the request timeout:
Examples for the command errors are below, in testing steps.
Acceptance criteria
Users and FOSSA support staff have more actionable and easy to read error messages, which provide more debugging guidance.
Testing plan
To test exec error rendering in the case of "executable not found", I ran:
To test executable failing due to build issues, I made
Cargo.toml
invalid syntax and ran:I don't have a great way to test the two networking errors, as I'm pretty sure they're generally caused by local networking conditions. I think since this is only a change in the documentation rendered in the face of these errors it's safe, but reviewer, if you want me to set up an environment that'd allow me to test these please let me know.
Risks
This change is only to help text rendered in the case of an error, as such I think it's low risk from the standpoint of "successfully executing FOSSA CLI" but medium risk from the standpoint of "not confusing users".
I would love any thoughts folks have on the formatting or content of these messages!
Checklist
docs/
.Changelog.md
. If this PR did not mark a release, I added my changes into an# Unreleased
section at the top..fossa.yml
orfossa-deps.{json.yml}
, I updateddocs/references/files/*.schema.json
. You may also need to update these if you have added/removed new dependency type (e.g.pip
) or analysis target type (e.g.poetry
).