Merge pull request #23768 from edx/asad/prod-1394-fix
Fixed error message check on 403
This commit is contained in:
@@ -15,7 +15,7 @@ const deactivate = (password) => fetch('/api/user/v1/accounts/deactivate_logout/
|
||||
return response;
|
||||
}
|
||||
|
||||
throw new Error(response);
|
||||
throw new Error(response.status);
|
||||
});
|
||||
|
||||
export {
|
||||
|
||||
@@ -52,9 +52,8 @@ class StudentAccountDeletionConfirmationModal extends React.Component {
|
||||
}
|
||||
|
||||
failedSubmission(error) {
|
||||
const { status } = error;
|
||||
const title = status === 403 ? gettext('Password is incorrect') : gettext('Unable to delete account');
|
||||
const body = status === 403 ? gettext('Please re-enter your password.') : gettext('Sorry, there was an error trying to process your request. Please try again later.');
|
||||
const title = error.message === '403' ? gettext('Password is incorrect') : gettext('Unable to delete account');
|
||||
const body = error.message === '403' ? gettext('Please re-enter your password.') : gettext('Sorry, there was an error trying to process your request. Please try again later.');
|
||||
|
||||
this.setState({
|
||||
passwordSubmitted: false,
|
||||
|
||||
Reference in New Issue
Block a user