You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
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>
This commit is contained in:
@@ -206,10 +206,10 @@ export default class GeneralUserSettingsTab extends React.Component {
|
|||||||
|
|
||||||
_onPasswordChangeError = (err) => {
|
_onPasswordChangeError = (err) => {
|
||||||
// TODO: Figure out a design that doesn't involve replacing the current dialog
|
// 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) {
|
if (err.httpStatus === 403) {
|
||||||
errMsg = _t("Failed to change password. Is your password correct?");
|
errMsg = _t("Failed to change password. Is your password correct?");
|
||||||
} else if (err.httpStatus) {
|
} else if (!errMsg) {
|
||||||
errMsg += ` (HTTP status ${err.httpStatus})`;
|
errMsg += ` (HTTP status ${err.httpStatus})`;
|
||||||
}
|
}
|
||||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
|||||||
Reference in New Issue
Block a user