Added error handling on REST request

This commit is contained in:
Philipp Czora
2018-11-09 15:36:35 +01:00
parent 1cfe7186bd
commit 4702666628

View File

@@ -1,11 +1,11 @@
// @flow // @flow
import React from "react"; import React from "react";
import { import {
SubmitButton,
Notification,
ErrorNotification, ErrorNotification,
InputField, InputField,
PasswordConfirmation Notification,
PasswordConfirmation,
SubmitButton
} from "@scm-manager/ui-components"; } from "@scm-manager/ui-components";
import { translate } from "react-i18next"; import { translate } from "react-i18next";
import type { Me } from "@scm-manager/ui-types"; import type { Me } from "@scm-manager/ui-types";
@@ -77,7 +77,9 @@ class ChangeUserPassword extends React.Component<Props, State> {
this.setSuccessfulState(); this.setSuccessfulState();
} }
}) })
.catch(err => {}); .catch(err => {
this.setErrorState(err);
});
} }
}; };