Handle null response case (#7512)

This commit is contained in:
Oliver 2024-06-26 08:26:38 +10:00 committed by GitHub
parent c9e9ef1754
commit 9c3914db0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,