Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/sveltekit
SDK Version
7.100.1
Framework Version
SvelteKit 2.5.0
Link to Sentry event
SDK Setup
Sentry.init({
dsn: "<dsn>",
integrations: [
browserTracingIntegration(),
captureConsoleIntegration({
levels: ["warn", "error", "assert"],
}),
],
release,
environment: "<environment>",
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
attachStacktrace: true,
ignoreErrors: [
...
],
});
Steps to Reproduce
Using Sveltekit, throw a 4XX error in the load function for a page, and then navigate to that page via client-side navigation.
In my specific case, I can repro by logging in to my site and opening another tab (both tabs are now logged in). I logout on one of the tabs and then navigate to another page on the other tab. That page's load function hits an API that returns a 403, which is then thrown as a sveltekit error(403)
. The page is rendered using +error.svelte
, but sentry captures the exception.
On the server side sentry ignores 4XX errors, but on the client side it doesn't. I think sentry should ignore 4XX errors on the client side as well, unless I'm missing some reason that these should not be ignored on the client side.
Expected Result
4XX errors are ignored by sentry on the client and server side
Actual Result
4XX errors are ignored by sentry on the server side, but not on the client side.
Metadata
Metadata
Assignees
Type
Projects
Status