If we have a server action like this:
'use server';
export async function serverActionRoutine(){
throw new Error('prod error');
}
on the client, the error is obfuscated - now I know we can do this instead:
'use server';
export async function serverActionRoutine(){
try{
throw new Error('prod error');
} catch(error){
return {success: false, error}
}
}
but we have a lot of code that simply throws and re-factoring it all on front-end and backend would be unideal. I simply want to switch off error obfuscation in production - how?