-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
forms + enhance: serialization issue of returned data from +page.server.js #7203
Comments
This is working as intended, because |
Ok, thanks. For now, I'll migrate my code to an endpoint and will hope that #7177 will find its way to (In my case, I would like to keep the type of the returned data, as we use an ORM and we made sure it returns edit: |
@dummdidumm feel free to tell if help is needed/possible on #7177 |
Describe the bug
Let say we have an action in a
+page.server.js
(here, insrc/routes/project/truc
)And the corresponding form in
+page.svelte
It just works as expected.
Now, if we change the form to use
enhance
:It breaks with a stacktrace which likes:
Reproduction
(I'm unsure if stackblitz runs correctly, as I don't get the stacktrace reported above, but it still breaks).
edit: on stackblitz, there is a cross-origin issue on stackblitz side (
Cross-site POST form submissions are forbidden
)https://stackblitz.com/edit/sveltejs-kit-template-default-fuvf3t?file=src/routes/form/+page.server.js
Logs
Severity
blocking all usage of SvelteKit
Additional Information
It could be worked around by migrating the action code to an endpoint (but doing so would be a shame :-) )
It seems that
devalue
is not used by action responses.The text was updated successfully, but these errors were encountered: