Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapping redirect with actionResult doesn't work in Svelte 5 #535

Open
1 task done
junekhan opened this issue Dec 19, 2024 · 1 comment
Open
1 task done

Wrapping redirect with actionResult doesn't work in Svelte 5 #535

junekhan opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working svelte-5 Related to Svelte 5

Comments

@junekhan
Copy link

  • Before posting an issue, read the FAQ and search the previous issues.

Description
When I try returning a redirect response as follows:

return actionResult("redirect", "/", {
				status: 302,
				message: {
					type: "success",
					message: "Success! Heading to the login page!"
				},
			});

I get the error:

Data returned from action inside /reset-password is not serializable. Form actions need to return plain objects or fail(). E.g. return { success: true } or return fail(400, { message: "invalid" });

My packages:

"svelte": "^5.1.10",
"sveltekit-superforms": "^2.20.0",
@junekhan junekhan added the bug Something isn't working label Dec 19, 2024
@ciscoheat ciscoheat added the svelte-5 Related to Svelte 5 label Jan 21, 2025
@ciscoheat
Copy link
Owner

I cannot reproduce this, are you still having this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working svelte-5 Related to Svelte 5
Projects
None yet
Development

No branches or pull requests

2 participants