Duplicates
Latest version
Current behavior 😯
When throwing an error in a server action the Error is being serialized and sent to the client with the stack trace which poses a security issue leaking production code file locations and function names.
Expected behavior 🤔
At least on Production don't send server's stack traces to the client.
Steps to reproduce 🕹
Any error thrown in server action:
const myAction = action(async () => {
'use server';
throw new Error('my server error');
});
See stackblitz full example