Skip to content

Commit

Permalink
Merge pull request #18118 from mvdbeek/ignore_admin_required_register…
Browse files Browse the repository at this point in the history
…ed_user_required_events

[24.0] Ignore AdminRequired and RegisteredUserRequired Sentry events
  • Loading branch information
martenson authored May 9, 2024
2 parents f2ddaa4 + 4797285 commit 5a88e40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/src/onload/globalInits/initSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ export const initSentry = (galaxy, config) => {
Sentry.init({
dsn: sentry_dsn_public,
release: release,
beforeSend(event, hint) {
const error = hint.originalException;
if (["AdminRequired", "RegisteredUserRequired"].includes(error?.name)) {
// ignore these error events
return null;
}
return event;
},
});
if (email) {
Sentry.configureScope((scope) => {
Expand Down

0 comments on commit 5a88e40

Please sign in to comment.