Skip to content

catch uncaught BaseException and asyncio.CancelledError - #1231

Open
aagbsn wants to merge 4 commits into
masterfrom
catch_cancellederror_baseexception
Open

catch uncaught BaseException and asyncio.CancelledError#1231
aagbsn wants to merge 4 commits into
masterfrom
catch_cancellederror_baseexception

Conversation

@aagbsn

@aagbsn aagbsn commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

because asyncio.CancelledError inherits from BaseException rather than Exception it may not be caught, and FastAPI may not log these exceptions in the same way.

LDiazN and others added 2 commits July 27, 2026 13:43
because asyncio.CancelledError inherits from BaseException rather than
Exception it may not be caught, and FastAPI may not log these
exceptions in the same way.
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 12.00000% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.19%. Comparing base (75664aa) to head (d5877ea).

Files with missing lines Patch % Lines
...niprobe/src/ooniprobe/routers/v1/probe_services.py 12.00% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1231      +/-   ##
==========================================
- Coverage   92.42%   92.19%   -0.24%     
==========================================
  Files          86       86              
  Lines        8599     8624      +25     
  Branches      509      509              
==========================================
+ Hits         7948     7951       +3     
- Misses        541      563      +22     
  Partials      110      110              
Flag Coverage Δ
ooniauth 100.00% <ø> (ø)
oonifindings 97.32% <ø> (ø)
oonimeasurements 88.97% <ø> (ø)
ooniprobe 89.81% <12.00%> (-0.54%) ⬇️
oonirun 98.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

aagbsn added 2 commits July 27, 2026 14:23
I noticed we do catch BaseException raised by check_ooniauth_health, but
not _verify_submit
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.

2 participants