-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Package: sveltekitIssues related to the Sentry SvelteKit SDKIssues related to the Sentry SvelteKit SDK
Description
The incorrect behaviour seems to be present in @sentry/sveltekit@7.52.1 - after following the setup instructions, with a pretty vanilla SvelteKit application, redirects from within the server hooks handle() function are being reported to Sentry as errors. Or rather, we see the following error since a SvelteKit redirect is not an instance of class Error:
Object.captureException
💀 Unhandled Non-Error exception captured with keys: location, status
A minimal reproduction would be something like this:
// hooks.server.ts
export const handle = async ({ event, resolve }) => {
// dummy logic to handle users who aren't logged in
if (event.url.pathname !== '/login') {
throw redirect(303, '/login');
}
const response = await resolve(event);
return response;
};
Originally posted by @abirtley in #7719 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Package: sveltekitIssues related to the Sentry SvelteKit SDKIssues related to the Sentry SvelteKit SDK
Fields
Give feedbackNo fields configured for issues without a type.