Closed
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? If you use the CDN bundles, please specify the exact bundle (e.g. bundle.tracing.min.js
) in your SDK setup.
@sentry/sveltekit
SDK Version
7.46.0
Framework Version
1.14.0
Link to Sentry event
SDK Setup
No response
Steps to Reproduce
Instrument a Sveltekit load function in a +page.ts
file with wrapLoadWithSentry
, and throw a redirect.
For instance:
import { wrapLoadWithSentry } from "@sentry/sveltekit";
import { redirect } from "@sveltejs/kit";
import type { PageLoad } from "./$types";
export const load: PageLoad = wrapLoadWithSentry(async () => {
throw redirect(302, "/some/other/path");
});
Expected Result
redirect
errors thrown from load functions should not create a new issue in sentry, since this is just a control flow mechanism in load functions to return a redirect.
It looks like this can be ignored in the same place sentry is ignoring 4xx errors on the server side:
And I believe there should be similar logic in the client side as well:
Actual Result
A new issue is created when a redirect error is thrown in a load function