Skip to content

fix(sentry): stop reporting Monaco cancellations when an editor closes - #332

Merged
MrYuion merged 1 commit into
developfrom
t3/fix-backoffice-4v
Oct 29, 2026
Merged

MrYuion merged 1 commit into
developfrom
t3/fix-backoffice-4v

Conversation

@MrYuion

@MrYuion MrYuion commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator

Sentry reported an unhandled Canceled: Canceled error on the zone metadata page (BACKOFFICE-4V). It occurs when a user clicks in a metadata editor and then closes the block in less than 50 ms.

Monaco's word highlighter starts a 50 ms delay and does not keep the promise. When the editor is disposed during that delay, Monaco cancels the promise. Nothing handles the rejection, so Angular sends it to our error handler. The error is a normal cancellation, not a failure. SentryReportingErrorHandler now ignores errors that match Monaco's own isCancellationError check (name and message are both Canceled). VS Code ignores them in the same way.

Proof: I ran the dev server with the mock backend and used Playwright in Chromium to click in the editor and then click the block header about 12 ms later. Before the fix, 5 of 5 runs logged the same Canceled stack as Sentry. After the fix, no runs logged it. A new unit test fails without the fix. Lint, all 1085 unit tests and the production build pass.

Fixes BACKOFFICE-4V

Reviewed with sol-loop: 1 round with gpt-6.1-sol on high. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code). Reviewed by GPT-6.1 Sol in Codex.

🤖 Generated with Claude Code

Monaco drops the promise from its word highlighter delay. When an editor
is disposed during that delay, the promise rejects with "Canceled" and
Angular sends it to the error handler. The handler now ignores Monaco
cancellations, as VS Code does.

Fixes BACKOFFICE-4V

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

Deployment failed for project backoffice with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/placeos?upgradeToPro=build-rate-limit

@MrYuion
MrYuion merged commit 1e74981 into develop Oct 29, 2026
5 of 6 checks passed
@MrYuion
MrYuion deleted the t3/fix-backoffice-4v branch October 29, 2026 02:32
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.

1 participant