-
Notifications
You must be signed in to change notification settings - Fork 380
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
More detailed API key error #921
base: master
Are you sure you want to change the base?
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.
Thanks for making our CLI errors more actionable!
I think you could add one more assertion to the test and then it's ready to ship
case "windows": | ||
assert.ErrorContains(t, err, `config.toml: The system cannot find the file specified.`) | ||
default: | ||
assert.ErrorContains(t, err, `config.toml: no such file or directory`) |
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.
Sometimes these error messages change or vary (e.g., different linux distros) and I'd like us to have a very obvious and actionable signal if/when that happens, since we're effectively "scraping" a non-guaranteed API.
Can we have an assertion somewhere that alerts us if neither of the two cases we know about today are met?
Noticed that we were swallowing config errors when returning API keys if something on the config-level was busted. We probably want that for general usage but I made this configurable depending on the log-level.