diff --git a/components/auth/login-form.tsx b/components/auth/login-form.tsx index a84dc7f..0f24d14 100644 --- a/components/auth/login-form.tsx +++ b/components/auth/login-form.tsx @@ -55,6 +55,11 @@ export function LoginForm({ className, ...props }: DivProps) { router.replace("/dashboard"); }, onError: (ctx) => { + if (ctx.error.status === 500 && ctx.error.statusText === "Internal Server Error") { + toast.error("Ocorreu uma falha na requisição. Tente novamente mais tarde."); + } + + setError(ctx.error.message); setLoadingEmail(false); },