throwing error is server action is not working in production

i am trying to throw error from server action and catching it in client it is working on development but it is not in production it is giving me given below error:- An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error. code is basically this :-
"use server"
export function action(){
if(somethingWentWrong)
throw new Error("unable to perform this task");
return ....;
}
"use server"
export function action(){
if(somethingWentWrong)
throw new Error("unable to perform this task");
return ....;
}
in client side ```js "use client" function Compo(){ async function onClick(){ try{ await action(); }catch(err){ console.log(err.message); } ///...some things render } can anyone tell me why?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server