Next.js Discord

Discord Forum

Server actions gives error about server component

Unanswered
Fire ant posted this in #help-forum
Open in Discord
Fire antOP
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 code
"use server";
import { cookies } from "next/headers";
import { myDb } from "@/app/utils/db";

interface SigninData {
  email: string;
  password: string;
}

export async function signin({ email, password }: SigninData): Promise<void> {
  try {
   // db login logic
  } catch (error) {
    // Handle signup errors
    console.error("Signin error:", error);
  }
}

My component using use client, using formdata

In local it shows the error message if invalid login details, in build version it shows that server component error, and not my custom error

1 Reply

Fire antOP
any help