Skip to content

fix(promise): forward pool error events - #4487

Open
GiHoon1123 wants to merge 3 commits into
sidorares:masterfrom
GiHoon1123:fix/pool-error-event-types
Open

fix(promise): forward pool error events#4487
GiHoon1123 wants to merge 3 commits into
sidorares:masterfrom
GiHoon1123:fix/pool-error-event-types

Conversation

@GiHoon1123

Copy link
Copy Markdown

Refs #3749

Promise pools inherit lifecycle events from the underlying core pool, but the error event was not forwarded and was not exposed in the promise pool types.

This adds error to the forwarded pool events and adds a matching pool.on('error', ...) overload for the promise API. The existing promise wrapper event test now covers error forwarding, and the TypeScript build tests cover the promise pool event signature.

Tests:

  • npm run typecheck
  • npm run lint
  • npm run test:build

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.51%. Comparing base (f3a60bc) to head (90f419a).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4487   +/-   ##
=======================================
  Coverage   92.50%   92.51%           
=======================================
  Files          93       93           
  Lines       15909    15915    +6     
  Branches     2275     2275           
=======================================
+ Hits        14717    14723    +6     
  Misses       1192     1192           
Flag Coverage Δ
compression-0 92.12% <100.00%> (+<0.01%) ⬆️
compression-1 92.49% <100.00%> (+<0.01%) ⬆️
static-parser-0 91.32% <100.00%> (+<0.01%) ⬆️
static-parser-1 91.44% <100.00%> (+<0.01%) ⬆️
tls-0 92.07% <100.00%> (+<0.01%) ⬆️
tls-1 92.51% <100.00%> (+<0.01%) ⬆️

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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sidorares

Copy link
Copy Markdown
Owner

@wellwelwel don't merge just yet. Wanted to check first that pool tracks idle connection errors at all - that might be not the case

@wellwelwel wellwelwel linked an issue Aug 24, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error event missing in types

3 participants