Skip to content

Conversation

@punitarani
Copy link
Owner

Fix Sentry wrapper invocation order to resolve "Illegal invocation" errors and restore observability.

The previous PR incorrectly ordered arguments for Sentry.withSentry, causing Cloudflare Workers to throw "Illegal invocation" errors and disabling Sentry monitoring for scheduled, queue, and fetch handlers. This change corrects the argument order to Sentry.withSentry(handlers, optionsResolver).


Open in Cursor Open in Web

@vercel
Copy link

vercel bot commented Oct 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
flights-tracker Ready Ready Preview Comment Oct 16, 2025 10:51pm

@cursor
Copy link

cursor bot commented Oct 16, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Correct @sentry/cloudflare withSentry invocation order and fix formatting to resolve Illegal invocation errors and re-enable monitoring in Workers.
Swap argument order back to (options, handlers) which the SDK expects, while keeping formatting fix applied.
@punitarani punitarani marked this pull request as ready for review October 16, 2025 22:52
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.

3 participants