Show details when login fails with unknown error

This commit is contained in:
miruka 2020-03-29 11:48:04 -04:00
parent eafd65d490
commit 6850ef26f5

View File

@ -51,17 +51,21 @@ HBox {
"AccountSettings/AccountSettings", {userId} "AccountSettings/AccountSettings", {userId}
) )
}, type => { }, (type, args, error, traceback, uuid) => {
loginFuture = null loginFuture = null
signInTimeout.stop() signInTimeout.stop()
let txt = qsTr("Invalid request or login type") let txt = qsTr(
"Invalid request, login type or unknown error: %1",
).arg(type)
if (type === "MatrixForbidden") type === "MatrixForbidden" ?
txt = qsTr("Invalid username or password") txt = qsTr("Invalid username or password") :
if (type === "MatrixUserDeactivated") type === "MatrixUserDeactivated" ?
txt = qsTr("This account was deactivated") txt = qsTr("This account was deactivated") :
utils.showError(type, traceback, uuid)
errorMessage.text = txt errorMessage.text = txt
}) })