From fc152ee745c4d37cce669cd450a870a18972f594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Sun, 31 Aug 2025 07:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E9=94=99=E8=AF=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/signup/page.tsx | 2 +- lib/auth.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/signup/page.tsx b/app/signup/page.tsx index e6a79bb..c657728 100644 --- a/app/signup/page.tsx +++ b/app/signup/page.tsx @@ -124,7 +124,7 @@ export default function SignupPage() { router.push("/login?registered=true"); } catch (error: any) { console.error("Signup error:", error); - setFormError(error.msg || "Registration failed, please try again"); + setFormError(error.message || "Registration failed, please try again"); } finally { setIsSubmitting(false); } diff --git a/lib/auth.ts b/lib/auth.ts index 3faeef9..55945ba 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -393,7 +393,7 @@ export const registerUser = async ({ const data = await response.json(); console.log('data', data) if(!data.success){ - throw new Error(data.msg) + throw new Error(data.message) } return data as { success: boolean;