Skip to content

fix: prevent reporting expected module restart errors to Sentry (#599) #761

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

Closed

Conversation

Hany-Almnaem
Copy link
Contributor

Summary

This PR fixes #599 by ensuring we no longer report expected module restart errors (due to inactivity) to Sentry.


Changes

  • Refactored maybeReportErrorToSentry() to support dependency injection for testability
  • Ensured module inactivity errors are marked with reportToSentry: false
  • Removed direct use of Sentry.captureException and used DI to allow isolated unit testing
  • Added minimal unit tests for maybeReportErrorToSentry() using a spy
  • Replaced frozen namespace usage (Sentry) with functional imports (captureException, withScope)
  • Linted and confirmed formatting with Prettier

Copy link

socket-security bot commented May 22, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedsinon@​20.0.0991009889100

View full report

@bajtos
Copy link
Member

bajtos commented May 28, 2025

Thank you for the pull request, @Hany-Almnaem.

It is unfortunately no longer relevant, because we decided to remove the Sentry integration - see #765.

@bajtos bajtos closed this May 28, 2025
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.

Don't report to Sentry when a module was restarted due to inactivity
2 participants