Skip to content

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

Closed
DAreRodz wants to merge 1 commit into
trunkfrom
fix/iapi-withscope-util-on-exception
Closed

Interactivity: Fix withScope to restore scope on thrown exception inside async functions#62555
DAreRodz wants to merge 1 commit into
trunkfrom
fix/iapi-withscope-util-on-exception

Conversation

@DAreRodz

Copy link
Copy Markdown
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. [Package] Interactivity /packages/interactivity labels Jun 13, 2024

@cbravobernal cbravobernal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@luisherranz

Copy link
Copy Markdown
Member

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

@johnbillion johnbillion deleted the fix/iapi-withscope-util-on-exception branch February 10, 2025 16:51
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. [Package] Interactivity /packages/interactivity [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants