fix password change popup message

Fixed bad error message when providing bad old password during password change.

Signed-off-by: Marek Matys <themarcq@gmail.com>
pull/21833/head
Marek Matys 2021-03-25 14:05:06 +01:00 committed by Marek Matys
parent 760b11f214
commit b5bc6251cf
1 changed files with 2 additions and 2 deletions

View File

@ -206,10 +206,10 @@ export default class GeneralUserSettingsTab extends React.Component {
_onPasswordChangeError = (err) => {
// TODO: Figure out a design that doesn't involve replacing the current dialog
let errMsg = err.error || "";
let errMsg = err.error || err.message || "";
if (err.httpStatus === 403) {
errMsg = _t("Failed to change password. Is your password correct?");
} else if (err.httpStatus) {
} else if (!errMsg) {
errMsg += ` (HTTP status ${err.httpStatus})`;
}
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");