Skip to content

refactor(async/unstable): make circuit breaker resilient to throwing callbacks#6996

Merged
kt3k merged 3 commits intodenoland:mainfrom
tomas-zijdemans:cb-trycatch
Feb 16, 2026
Merged

refactor(async/unstable): make circuit breaker resilient to throwing callbacks#6996
kt3k merged 3 commits intodenoland:mainfrom
tomas-zijdemans:cb-trycatch

Conversation

@tomas-zijdemans
Copy link
Contributor

@tomas-zijdemans tomas-zijdemans commented Feb 8, 2026

  • fixed a bug where a throwing callback (e.g. onFailure, onStateChange) would crash the circuit breaker mid-update, hiding the original error that your code was trying to throw.
  • fixed a bug where failure detection (e.g. flagging HTTP 500 responses as failures) was silently blocked by custom error filters (isFailure), so those results would never trip the circuit breaker
  • fixed a bug where two requests racing during recovery could cause a failed request to reopen the circuit, only for a concurrent successful request to immediately close it again.

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.20%. Comparing base (1cd85bf) to head (ecdca7f).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6996   +/-   ##
=======================================
  Coverage   94.20%   94.20%           
=======================================
  Files         613      613           
  Lines       47710    47725   +15     
  Branches     8299     8301    +2     
=======================================
+ Hits        44945    44961   +16     
  Misses       2697     2697           
+ Partials       68       67    -1     

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

@kt3k kt3k merged commit 35b5624 into denoland:main Feb 16, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants