We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am getting errors using server actions. The error occurs when a server action function has await code.
await
'use server'; import { rerender } from 'waku/server'; const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); export const actionWithFormData = async (formData: FormData) => { await sleep(0); // Getting error with await const title = formData.get('title'); if (title === null) { throw new Error('Unexpected null title'); } console.log(title); rerender('/'); }; export const actionWithoutFormData = async (title: string) => { await sleep(0); // Getting error with await console.log(title); rerender('/'); };
If you remove the await line, no errors will happen.
version: 0.20.0-alpha.0 repro: https://github.com/t6adev/waku-form-action-sample
The text was updated successfully, but these errors were encountered:
Thanks for reporting! 🤔
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
I am getting errors using server actions.
The error occurs when a server action function has
await
code.If you remove the await line, no errors will happen.
version: 0.20.0-alpha.0
repro: https://github.com/t6adev/waku-form-action-sample
The text was updated successfully, but these errors were encountered: