Skip to content

Commit

Permalink
Remove redundant error handling code
Browse files Browse the repository at this point in the history
  • Loading branch information
askvortsov1 committed May 12, 2020
1 parent 22ff44b commit 6911395
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions js/src/admin/components/MailPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,8 @@ export default class MailPage extends Page {
})
.catch((error) => {
this.sendingTest = false;
const response = JSON.parse(error.responseText)['message'];
if (Array.isArray(response)) {
response.forEach((errorMessage) => {
app.alerts.show(
new Alert({
type: 'error',
children: errorMessage,
})
);
});
} else {
app.alerts.show(
new Alert({
type: 'error',
children: app.translator.trans('core.admin.email.send_test_mail_error'),
})
);
}
m.redraw();
throw error;
});
}

Expand Down

0 comments on commit 6911395

Please sign in to comment.