-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
"Flag provided but not defined" doesn't give enough details #852
Comments
I'd like an opportunity to tackle this one. working on it now |
@Zohvek yay cool! 🎉 |
Moving this one back to |
I can try working on this, but what kind of error exactly would be more explicit than this? Something like: I'm not sure that is any better? Do you have any suggestions @lynncyrin ? |
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else. |
This is closer, but still probably not verbose enough. There's also a few words / phrases that are likely to trip people up here, specifically:
^ those all have meaning for CLI authors, but are likely not very understable for many CLI users. In particular there's the "you did not define", which isn't true from the PoV of users. Working from those points, here's my suggested error message:
the changes look like this:
|
This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant. |
I'm also vaguely skeptical that the casual user will know what the word "flag" means, so it might be better to remove that word from the error message entirely. On a related note, the "app" term only likely makes sense if you're a CLI author. So I'm thinking about an error message like this
|
A few examples of existing CLIs with error messages:
Fun fact: No CLI that I tried accepted a The word I'd stick with the most common pattern and probably just do |
Your appraisal of the landscape is a good one 👍 That said, changing the error message to So what I would like to see here is some capability that allows CLI authors to provide their own error messages for all of our errors. |
I personally think there's value in a shorter error message compared to what we currently have. It may be confusing because it offers information that's irrelevant to the person trying to debug, rather than not offering enough context. Regarding providing different error messages, I agree, that functionality is necessary. It looks like the |
This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else. |
Closing this as it has become stale. |
I have an error like this: but the apiKey is provide as requested by the documentation! And I can not find any info of what is really the cause. |
Duplicate of #427 |
"Flag provided but not defined" doesn't give enough details for end users who aren't specifically aware of how CLIs work. I get a lot of bug reports that are "I got this obscure error message, and I'm not sure what to do".
See also
The text was updated successfully, but these errors were encountered: