Skip to content

Commit

Permalink
Added filtering for expected Turnstile errors in Sentry (#2573)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuastegmaier authored Oct 25, 2024
1 parent e3a6975 commit 6f810ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion concordia/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,18 @@ <h2 class="h3 font-weight-normal text-center text-lg-left">Follow
integrity="sha384-PKOJCSVL6suo2Qz9Hs4hkrZqX7S6iLwadxXxBEa0h0ycsuoDNZCiAcHlPGHYxU6l"
crossorigin="anonymous"></script>
<script>
// Don't load Sentry if this is the "always online" version of the page,
// which is the version CloudFlare serves if the actual site is down
if (navigator.userAgent.indexOf("CloudFlare-AlwaysOnline") < 0) {
Sentry.init({
'dsn': '{{ SENTRY_FRONTEND_DSN }}',
'release': '{{ APPLICATION_VERSION }}',
'environment': '{{ CONCORDIA_ENVIRONMENT }}',
'blacklistUrls': [
/^moz-extension/
]
],
// Turnstile 300xxx and 600xxx errors indicate the user failed validation. We don't want those in Sentry
'ignoreErrors': ["[Cloudflare Turnstile] Error: 600", "[Cloudflare Turnstile] Error: 300"]
});
}
</script>
Expand Down

0 comments on commit 6f810ac

Please sign in to comment.