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

refactor: exception handling #27

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

nponsard
Copy link
Contributor

No description provided.

@nponsard nponsard linked an issue Sep 28, 2023 that may be closed by this pull request
@nponsard
Copy link
Contributor Author

nponsard commented Sep 28, 2023

@robin-nitrokey What do you think of this solution ?

If you're ok with this I will change the handling in pynitrokey.

@Nitrokey Nitrokey deleted a comment from codecov bot Sep 28, 2023
Copy link
Member

@robin-nitrokey robin-nitrokey left a comment

Choose a reason for hiding this comment

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

The exception type looks good to me. But AFAIS _handle_exception is only called for ApiException instances, right?

@nponsard
Copy link
Contributor Author

The exception type looks good to me. But AFAIS _handle_exception is only called for ApiException instances, right?

Oh my bad, I forgot to change it to catch all exceptions. I'll change it tomorrow.

@nponsard nponsard force-pushed the 25-use-custom-exception-type-for-ssl-issues branch from 027aec8 to 17c8145 Compare September 29, 2023 07:42
@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Attention: 102 lines in your changes are missing coverage. Please review.

Comparison is base (816b0ed) 79.91% compared to head (17c8145) 79.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
- Coverage   79.91%   79.89%   -0.03%     
==========================================
  Files         782      782              
  Lines       13670    13685      +15     
==========================================
+ Hits        10925    10934       +9     
- Misses       2745     2751       +6     
Files Coverage Δ
nethsm/__init__.py 76.65% <17.07%> (-0.39%) ⬇️

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

@nponsard nponsard merged commit 17c8145 into main Sep 29, 2023
@nponsard nponsard deleted the 25-use-custom-exception-type-for-ssl-issues branch September 29, 2023 07:46
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.

Use custom exception type for SSL issues
2 participants