-
Notifications
You must be signed in to change notification settings - Fork 0
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
TSPS-345 Mute sentry alerts for HttpRequestMethodNotSupportedException #206
TSPS-345 Mute sentry alerts for HttpRequestMethodNotSupportedException #206
Conversation
@@ -41,7 +41,6 @@ public ResponseEntity<ApiErrorReport> errorReportHandler(ErrorReportException ex | |||
// -- validation exceptions - we don't control the exception raised | |||
@ExceptionHandler({ | |||
MethodArgumentTypeMismatchException.class, | |||
HttpRequestMethodNotSupportedException.class, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes me a little nervous. we don't have any instances of this error in Sentry in dev in the last 30 days but this would be like a user doing something wrong, so not sure if this is going to mask something that the user is doing. but I think that it'll be ok - if that's the case, the user will still get the 4xx response and we can investigate logs if it's confusing to them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come we're removing this from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my understanding is if we keep it, those errors will always be caught by this rather than later on and we'll still get sentry alerts for it. unless we move the sentry filtering thing into this method, maybe that's the answer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah i misunderstood, you're totally right - will revert this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😈
@@ -41,7 +41,6 @@ public ResponseEntity<ApiErrorReport> errorReportHandler(ErrorReportException ex | |||
// -- validation exceptions - we don't control the exception raised | |||
@ExceptionHandler({ | |||
MethodArgumentTypeMismatchException.class, | |||
HttpRequestMethodNotSupportedException.class, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come we're removing this from here?
@@ -115,9 +114,11 @@ private ResponseEntity<ApiErrorReport> buildApiErrorReport( | |||
@Nullable String messageForApiErrorReport) { | |||
// logging 4** & 5** errors to sentry | |||
if (statusCode.is5xxServerError() || statusCode.is4xxClientError()) { | |||
if (ex.getClass() == NoResourceFoundException.class) { | |||
if (ex instanceof NoResourceFoundException | |||
|| ex instanceof HttpRequestMethodNotSupportedException) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we want we can still send this error to sentry and just change sentry to not alert on it ever (or not as often) if we're worried about not seeing errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems we should pick one place to ignore sentry errors, either here or in sentry, but not both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chatted in person
|
Description
We get Sentry alerts often for seemingly spam/bot calls to existing paths with invalid methods (POST, PROPFIND). Similar to #89, we don't send these to Sentry but do log that we did so.
Jira Ticket
https://broadworkbench.atlassian.net/browse/TSPS-345
Checklist (provide links to changes)