NF-033: Server Action threw an error
A Server Action on the remote threw, and the caller's promise rejected. The error came from the action's own code or from something it called.
Why This Error Occurred
A Server Action on the remote threw, and the caller's promise rejected. The error came from the action's own code or from something it called.
Possible Ways to Fix It
-
Find the original error in the remote's server log entry for
NF-033. In production the message sent to the browser is redacted. -
Handle expected failures inside the action and return a value instead of throwing:
'use server' export async function addToCart(formData: FormData) { const id = formData.get('id') if (typeof id !== 'string') return { error: 'Missing product id' } return { error: null } }
Useful Links
NF-032: Server Action request is invalid
The remote rejected a request to /nf/action with 400 before running any action, or with 413 because the body is over its limit (1 MiB by default). A plain...
NF-034: A client module imports a 'use server' file
The island build failed because a browser or SSR module imports a file that starts with 'use server'. In an island remote, Server Actions reach client...