Skip to content

Conversation

@AnujAga2005
Copy link
Contributor

Closes #1519

Problem

Previously, running bowtie info --versions would crash with a traceback if the GitHub API request failed due to missing authentication tokens.

Solution

I've wrapped the GitHub API iteration in _core.py with suppress(GitHubError). Now, if the API call fails, Bowtie gracefully skips the remote version tags and displays the rest of the implementation info using the locally available version data.

Testing

Added tests/test_info_versions.py which mocks the GitHub client and forces a GitHubError to verify that the function returns the fallback version instead of raising an exception.

@AnujAga2005
Copy link
Contributor Author

@Julian Ready for review! Please take a look.

@Julian
Copy link
Member

Julian commented Jan 22, 2026

I've seen this PR but I don't want any use of mocks in tests. I haven't had time to look more closely at suggesting what you can use instead, but that's what this is blocked on FYI!

@AnujAga2005
Copy link
Contributor Author

Understood. Whenever you have a suggestion for the testing pattern, I'm happy to update the code. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bowtie info --versions produces an ugly error message when unauathenticated

2 participants