Production-only error handling issue with unclear root cause.
The issue involves an error in Server Components render that only occurs in production, with sensitive details omitted. The error handling needs to be adjusted to provide more descriptive messages without exposing sensitive information. The main blocker is the inability to replicate the issue locally for debugging.
Using :
nextjs 14
zod
tailwind css
shadcn Ui
app running on digitalocena
Server Side Component Error
Microsoft Edge
Using git action on digital ocean (web app)
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.
my server action function
login page function:(client side)
This error only happens in production
and this what I get
This error message is printed in the console
⨯ lib\actions\authUserActions.ts (39:15) @ login ⨯ Error: Invalid email or password at login (./lib/actions/authUserActions.ts:52:15) digest: "740006343" 37 | return {message: "Login successful"} 38 | }catch(error: any){
39 | throw new Error(error.message); | ^ 40 | } 41 | }
Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!