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

handle other exceptions in the popup window #11

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

KyleQianliMa
Copy link

@KyleQianliMa KyleQianliMa commented Feb 27, 2025

Shiver crashes user tries to login without internet connection. This exception was raised "llib3.exceptions.NameResolutionError" which is not handled. This pr adds a blanket exception handling to display the exception in the pop up window.
EWM 9859
image

Fixed unit tests to correctly test difference use cases

Short description of the changes:

Long description of the changes:

Check list for the pull request

  • I have read the [CONTRIBUTING]
  • I have read the [CODE_OF_CONDUCT]
  • I have added tests for my changes
  • I have updated the documentation accordingly

Check list for the reviewer

  • I have read the [CONTRIBUTING]
  • I have verified the proposed changes
  • best software practices
    • all internal functions have an underbar, as is python standard
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

Manual test for the reviewer

References

…llib3.exceptions.NameResolutionError when there is no internet connection
@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.20%. Comparing base (bde2dce) to head (b8569fa).

Additional details and impacted files
@@            Coverage Diff             @@
##             next      #11      +/-   ##
==========================================
+ Coverage   95.07%   95.20%   +0.13%     
==========================================
  Files           3        3              
  Lines         142      146       +4     
==========================================
+ Hits          135      139       +4     
  Misses          7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# This is the error message that crashed Shiver when there is no internet connection
dialog.show_message.assert_called_once_with(
"The following exception occured: NameResolutionError.__init__() missing 3 \
required positional arguments: 'host', 'conn', and 'reason'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many spaces. It fails the test

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new push fixed this.

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.

3 participants