-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
Route with remote query which has redirect results in 500 undefined error.
<script lang="ts">
import { verifyUser } from "$lib/remote/auth.remote";
await verifyUser()
</script>
<p>protected</p>import { query } from "$app/server";
import { redirect } from "@sveltejs/kit";
export const verifyUser = query(() => {
redirect(307, '/')
})Error:
Reproduction
https://github.com/vladshcherbin/sveltekit-redirect-error
Logs
System Info
System:
OS: macOS 26.0
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.0.1
npm: 11.3.0
pnpm: 10.20.0
Browsers:
Chrome: 142.0.7444.60
Safari: 26.0
npmPackages:
@sveltejs/adapter-auto: ^7.0.0 => 7.0.0
@sveltejs/kit: ^2.48.4 => 2.48.4
@sveltejs/vite-plugin-svelte: ^6.2.1 => 6.2.1
svelte: ^5.43.3 => 5.43.3
vite: ^7.1.10 => 7.1.12Severity
serious, but I can work around it
Additional Information
There is no error if query is wrapped inside <svelte:boundary>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels