Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactivity: Fix withScope to restore scope on thrown exception inside async functions #62555

Closed
wants to merge 1 commit into from

Conversation

DAreRodz
Copy link
Contributor

What?

Fixes withScope() to maintain the Interactivity scope on captured exceptions inside async functions.

Related to #59708

Why?

This was previously fixed inside the store proxy handlers but not inside withScope(), which contains the same logic.

How?

Done so by 1) fixing the code inside withScope(), then 2) removing the duplicated code, and 3) using withScope() inside the store proxy handlers.

Testing Instructions

Tested by e2e tests (inside test/e2e/specs/interactivity/async-actions.spec.ts).

@DAreRodz DAreRodz added [Type] Bug An existing feature does not function as intended [Feature] Interactivity API API to add frontend interactivity to blocks. [Packages] Interactivity /packages/interactivity labels Jun 13, 2024
Copy link
Contributor

@cbravobernal cbravobernal left a comment

Choose a reason for hiding this comment

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

LGTM

@luisherranz
Copy link
Member

Closing, as this is included as part of this other pull request:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Interactivity API API to add frontend interactivity to blocks. [Packages] Interactivity /packages/interactivity [Type] Bug An existing feature does not function as intended
3 participants