From e70c525e02e68e5172b957088efe4c039e1bc186 Mon Sep 17 00:00:00 2001 From: Kevin Monisit Date: Fri, 11 Oct 2024 16:52:47 -0400 Subject: [PATCH 1/2] Update actions.ts --- app/lib/actions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/lib/actions.ts b/app/lib/actions.ts index 892f839..b9fa02b 100644 --- a/app/lib/actions.ts +++ b/app/lib/actions.ts @@ -74,8 +74,9 @@ export async function authenticate(email: string, password: string) { case 'CredentialsSignin': return 'Invalid credentials.'; default: - return 'Something went wrong.'; + return error.message; } + return error.message; } redirect('/dashboard'); return 'Something went wrong. '; @@ -193,7 +194,7 @@ export async function SignUp( case 'CredentialsSignin': resp.error = 'Invalid credentials.'; default: - resp.error = 'Something went wrong.'; + resp.error = error; } } } From 88be801349ca3a00176a6da24bee6ec4dba22e52 Mon Sep 17 00:00:00 2001 From: Andrew Somers <67980093+avsomers25@users.noreply.github.com> Date: Sat, 12 Oct 2024 12:56:47 -0400 Subject: [PATCH 2/2] Update actions.ts --- app/lib/actions.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/lib/actions.ts b/app/lib/actions.ts index b9fa02b..218a25b 100644 --- a/app/lib/actions.ts +++ b/app/lib/actions.ts @@ -76,7 +76,6 @@ export async function authenticate(email: string, password: string) { default: return error.message; } - return error.message; } redirect('/dashboard'); return 'Something went wrong. '; @@ -194,7 +193,7 @@ export async function SignUp( case 'CredentialsSignin': resp.error = 'Invalid credentials.'; default: - resp.error = error; + resp.error = error.message; } } }