Skip to content

fix: don't reject a binding call when a listener throws during resolve - #2010

Open
Yury Semikhatsky (yury-s) wants to merge 4 commits into
microsoft:mainfrom
yury-s:fix-2009
Open

Yury Semikhatsky (yury-s) wants to merge 4 commits into
microsoft:mainfrom
yury-s:fix-2009

Conversation

@yury-s

@yury-s Yury Semikhatsky (yury-s) commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • BindingCall.call sent resolve inside the binding's try. An exception thrown by an event listener while waiting for the reply was treated as the binding's failure, and the reject sent to the already resolved and disposed binding call failed with TargetClosedError, which replaced the listener's exception.
  • The try now covers only invoking the binding, and the resolve/reject reply is sent after it, so only failures of the binding function lead to reject.

Fixes #2009

@yury-s
Yury Semikhatsky (yury-s) marked this pull request as ready for review October 19, 2026 20:04
@yury-s Yury Semikhatsky (yury-s) changed the title fix: report listener exceptions instead of TargetClosedError during binding calls fix: don't reject a binding call when a listener throws during resolve Oct 19, 2026

This branch has not been deployed

No deployments
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.

[Bug]: An exception thrown by an event listener while a binding call is being resolved is replaced by TargetClosedError

2 participants