mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
Handle null response case (#7512)
This commit is contained in:
parent
c9e9ef1754
commit
9c3914db0a
@ -82,8 +82,8 @@ export const doBasicLogin = async (username: string, password: string) => {
|
|||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
if (
|
if (
|
||||||
err?.response.status == 403 &&
|
err?.response?.status == 403 &&
|
||||||
err?.response.data.detail == 'MFA required for this user'
|
err?.response?.data?.detail == 'MFA required for this user'
|
||||||
) {
|
) {
|
||||||
post(apiUrl(ApiEndpoints.user_login), {
|
post(apiUrl(ApiEndpoints.user_login), {
|
||||||
username: username,
|
username: username,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user