diff --git a/app/lib/actions.ts b/app/lib/actions.ts index 7dcb24b..61ca12e 100644 --- a/app/lib/actions.ts +++ b/app/lib/actions.ts @@ -199,9 +199,13 @@ export async function SignUp( } } } - } - //coment - else { + } else if (res_json.statusCode === 400){ + if (res_json.message && res_json.message.includes("Duplicate User")){ + resp.error = "Email already in use"; + }else { + resp.error = "Bad request. Please check your input."; + } + } else { if (res_json.body) { resp.error = res_json.body; } else {