fix(sveltekit): Avoid capturing Http 4xx errors on the client#10571
Merged
fix(sveltekit): Avoid capturing Http 4xx errors on the client#10571
Conversation
Contributor
size-limit report 📦
|
3 tasks
mydea
reviewed
Feb 8, 2024
| // Neither 400 errors, given that they are not valuable. | ||
| if ( | ||
| isRedirect(objectifiedErr) || | ||
| (isHttpError(objectifiedErr) && objectifiedErr.status < 500 && objectifiedErr.status >= 400) |
Member
There was a problem hiding this comment.
so, the issue linked complains about 403 errors being captured, it talks about ignoring all 4xx errors, but we only ignore 400 - is that correct/on purpose?
Member
Author
There was a problem hiding this comment.
It's on purpose in the sense that we have the same logic on the server side and generally, afaik, we never want to capture 4xx errors by default.
Member
There was a problem hiding this comment.
ahh wait, I got confused by the comment which says neither 400 errors and thought this was filtering only 400 itself, not 403. all good then!
Member
Author
There was a problem hiding this comment.
ahh sorry, that was my mistake. 4xx is definitely the better description
mydea
reviewed
Feb 8, 2024
mydea
approved these changes
Feb 8, 2024
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
Lms24
added a commit
that referenced
this pull request
Feb 12, 2024
Add the Http 400 avoidance logic from our server-side `load` function instrumentation to the client-side wrapper. Didn't know that these errors were a thing on the client side but now that we know, we definitely don't want to capture them. Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
Lms24
added a commit
that referenced
this pull request
Feb 12, 2024
Add the Http 400 avoidance logic from our server-side `load` function instrumentation to the client-side wrapper. Didn't know that these errors were a thing on the client side but now that we know, we definitely don't want to capture them. Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
This was referenced Feb 12, 2024
This was referenced Mar 12, 2024
This was referenced May 31, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the Http 400 avoidance logic from our server-side
loadfunction instrumentation to the client-side wrapper. Didn't know that these errors were a thing on the client side but now that we know, we definitely don't want to capture them.Also added tests
closes #10568