Uh oh!
There was an error while loading. Please reload this page.
fix(sveltekit): Avoid capturing Http 4xx errors on the client - #10571
Conversation
size-limit report 📦
|
| // Neither 400 errors, given that they are not valuable. | ||
| if ( | ||
| isRedirect(objectifiedErr) || | ||
| (isHttpError(objectifiedErr) && objectifiedErr.status < 500 && objectifiedErr.status >= 400) |
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?
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.
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!
There was a problem hiding this comment.
ahh sorry, that was my mistake. 4xx is definitely the better description
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Francesco Novy <francesco.novy@sentry.io>
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>
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 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