Sentry for Handled Worker Exceptions

Question about Sentry.
This integration allows you to connect to a Sentry project from your Worker to automcatically send errors and uncaught exceptions to Sentry with no code changes needed in the Workers application.
I see that Sentry will capture unhandled exceptions but I'm wondering if Sentry will also be notified for handled exceptions? I guess I'm confused what send errors means in the docs above. I am hoping to enable this but unsure if that means I will need to bake in Sentry the old-fashioned way.
3 Replies
enkoder
enkoder13mo ago
Check out toucan-js. It's super simple to add it to any worker. I pulled out the integration since I wanted more control over exceptions. https://github.com/enkoder/beanstalk/blob/main/api/src/index.ts#L100 As an example.
zhawtof
zhawtofOP13mo ago
Thanks @enkoder. Ended up going with Toucan. Would be nice if Cloudflare could update the docs to let others know about the handled exceptions.
enkoder
enkoder13mo ago
Happy to help! I'm still having some issues with source maps right now even though I'm uploading them. Check out my GH action in my repo if you'd like inspiration. Still haven't debugged what's going on
Want results from more Discord servers?
Add your server