Uninett / zinolib

Python library for zino
Apache License 2.0
1 stars 3 forks source link

Handle ValueError on setstate on closed event #43

Closed hmpf closed 8 months ago

hmpf commented 10 months ago

zinolib.ritz raises a ValueError if setstate does not respond with (200 , 'Ok'). We know that on setting a state on a closed event we get (500, 'Cannot reopen closed event {event_id}') in the exception message so if we get that, reraise as an EventClosedError. Other potential errors from setstate are let through.

github-actions[bot] commented 10 months ago

Test results

    3 files      3 suites   41s :stopwatch:   63 tests   63 :heavy_check_mark: 0 :zzz: 0 :x: 189 runs  189 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit 6188784b.

:recycle: This comment has been updated with latest results.

sonarcloud[bot] commented 10 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

codecov[bot] commented 10 months ago

Codecov Report

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

Comparison is base (f066d26) 71.51% compared to head (6188784) 71.56%. Report is 11 commits behind head on main.

Files Patch % Lines
src/zinolib/controllers/zino1.py 53.70% 25 Missing :warning:
src/zinolib/ritz.py 27.77% 13 Missing :warning:
src/zinolib/config/zino1.py 57.89% 8 Missing :warning:
src/zinolib/event_types.py 82.35% 3 Missing :warning:
src/zinolib/utils.py 94.44% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #43 +/- ## ========================================== + Coverage 71.51% 71.56% +0.04% ========================================== Files 13 13 Lines 1271 1361 +90 ========================================== + Hits 909 974 +65 - Misses 362 387 +25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.