Skip to content

Commit 5019ee1

Browse files
committed
chore: fix sentry errors
1 parent 9a85256 commit 5019ee1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/components/progress-bar.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ function EpicProgress() {
1818
if (!ref.current) return
1919
if (delayedPending) setAnimationComplete(false)
2020

21-
const animationPromises = ref.current
22-
.getAnimations()
21+
const animationPromises = ref.current?.getAnimations()
2322
.map(({ finished }) => finished)
2423

2524
void Promise.allSettled(animationPromises).then(() => {

server/utils/monitoring.ts

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export function init() {
2020
integrations: [
2121
Sentry.httpIntegration(),
2222
Sentry.prismaIntegration(),
23+
Sentry.httpContextIntegration(),
2324
nodeProfilingIntegration(),
2425
],
2526
tracesSampler(samplingContext) {
@@ -36,6 +37,13 @@ export function init() {
3637
return null
3738
}
3839

40+
// Check if the event contains an HTTP context with a response status code
41+
// 405 Method Not Allowed
42+
if (event.contexts?.response?.status_code === 405) {
43+
// Return null to drop the event and prevent it from being sent to Sentry
44+
return null;
45+
}
46+
3947
return event
4048
},
4149
})

0 commit comments

Comments
 (0)