From 9c3914db0a49e6f330f330583eaf08f3c5f92b54 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 26 Jun 2024 08:26:38 +1000 Subject: [PATCH] Handle null response case (#7512) --- src/frontend/src/functions/auth.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/functions/auth.tsx b/src/frontend/src/functions/auth.tsx index 0302e2ac75..863b20f24e 100644 --- a/src/frontend/src/functions/auth.tsx +++ b/src/frontend/src/functions/auth.tsx @@ -82,8 +82,8 @@ export const doBasicLogin = async (username: string, password: string) => { }) .catch((err) => { if ( - err?.response.status == 403 && - err?.response.data.detail == 'MFA required for this user' + err?.response?.status == 403 && + err?.response?.data?.detail == 'MFA required for this user' ) { post(apiUrl(ApiEndpoints.user_login), { username: username,