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

ValueError returned when no API key is found #52

Closed
JohnnyIrvin opened this issue Apr 1, 2023 · 0 comments · Fixed by #67
Closed

ValueError returned when no API key is found #52

JohnnyIrvin opened this issue Apr 1, 2023 · 0 comments · Fixed by #67
Assignees
Labels
bug Something isn't working

Comments

@JohnnyIrvin
Copy link
Owner

Translate ValueError to argparse error

Describe the bug
Currently, when no API key is found, a ValueError is returned instead of a more appropriate argparse error.

To Reproduce

  1. Run the program without specifying an API key.
  2. Observe that a ValueError is raised.

Expected behavior
When no API key is provided, the program should raise an argparse error that indicates the user must provide an API key.

Additional context
This bug may cause confusion for users if they are not familiar with the Python ValueError exception. It is also not the most helpful error message in this context, as it does not clearly indicate what went wrong or how to fix it. Replacing the ValueError with an argparse error will improve the clarity of error messages and make it easier for users to understand and fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant