mirror of
https://github.com/gotson/komga.git
synced 2026-05-09 05:10:19 +02:00
fix(webui): clearer error message on login error
This commit is contained in:
parent
e49047b4c9
commit
ca054f642f
1 changed files with 3 additions and 1 deletions
|
|
@ -29,8 +29,10 @@ export default class KomgaUsersService {
|
||||||
msg = 'Invalid authentication'
|
msg = 'Invalid authentication'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e.response.data.message) {
|
if (e.response?.data?.message) {
|
||||||
msg += `: ${e.response.data.message}`
|
msg += `: ${e.response.data.message}`
|
||||||
|
} else {
|
||||||
|
msg += `: ${e.message}`
|
||||||
}
|
}
|
||||||
throw new Error(msg)
|
throw new Error(msg)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue