From b8a9783db5dd8549c09db2185fbebe34ef7fe1fa Mon Sep 17 00:00:00 2001 From: Athurg Gooth Date: Sun, 4 Feb 2024 14:25:51 +0800 Subject: [PATCH] fix: signin error notification is not shown (#2908) fix signin error notification is not shown --- web/src/pages/SignIn.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/pages/SignIn.tsx b/web/src/pages/SignIn.tsx index 4372ef2e..d73b10fe 100644 --- a/web/src/pages/SignIn.tsx +++ b/web/src/pages/SignIn.tsx @@ -1,4 +1,5 @@ import { Button, Checkbox, Divider, Input } from "@mui/joy"; +import { ClientError } from "nice-grpc-web"; import { useEffect, useState } from "react"; import { toast } from "react-hot-toast"; import { Link } from "react-router-dom"; @@ -85,7 +86,7 @@ const SignIn = () => { } } catch (error: any) { console.error(error); - toast.error(error.response.data.message || t("message.login-failed")); + toast.error((error as ClientError).details || t("message.login-failed")); } actionBtnLoadingState.setFinish(); };