From 0c86f2705f0bf5c12c9bfcc1d2d8511e9539d7b1 Mon Sep 17 00:00:00 2001 From: Matthias Mair Date: Mon, 20 Jan 2025 22:06:14 +0100 Subject: [PATCH] add error message --- .../AccountSettings/SecurityContent.tsx | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx b/src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx index a17d55c091..13719bfc60 100644 --- a/src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx +++ b/src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx @@ -81,11 +81,14 @@ function EmailSection() { data?: any ) { const vals: any = data || { email: value }; - authApi(apiUrl(ApiEndpoints.auth_email), undefined, action, vals) - .then(() => { - refetch(); - }) - .catch((res: any) => console.log(res.data)); + return authApi( + apiUrl(ApiEndpoints.auth_email), + undefined, + action, + vals + ).then(() => { + refetch(); + }); } if (isLoading) return ; @@ -171,7 +174,20 @@ function EmailSection() {