Replies: 1 comment 1 reply
-
Yes, those errors are typically caused by bots trying to attack your site. If you don't want those cluttering your Sentry logs, you can add the following to server/utils/monitoring.ts Sentry.init({
dsn: 'YOUR_SENTRY_DSN',
integrations: [new Sentry.Integrations.HttpContext()], // Ensure HttpContext is captured
beforeSend(event) {
// Check if the event contains an HTTP context with a response status code
// 405 Method Not Allowed
if (event.contexts?.response?.status_code === 405) {
// Return null to drop the event and prevent it from being sent to Sentry
return null;
}
// Otherwise, send the event to Sentry
return event;
},
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've recently seen these errors in sentry and I'm just curious if anyone else is familiar with them. I'm assuming they are hacking attempts but I'm also curious if anything should be done to block these or if they are fine since they aren't handled as a route (just ignored basically)
Beta Was this translation helpful? Give feedback.
All reactions