FIX: Error messages from editing user being swallowed (#10908)
This commit is contained in:
parent
95a142741c
commit
b19e8ea206
|
@ -139,8 +139,8 @@ const AdminUser = User.extend({
|
|||
bootbox.hideAll();
|
||||
let error;
|
||||
AdminUser.find(user.get("id")).then((u) => user.setProperties(u));
|
||||
if (e.responseJSON && e.responseJSON.errors) {
|
||||
error = e.responseJSON.errors[0];
|
||||
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||
error = e.jqXHR.responseJSON.errors[0];
|
||||
}
|
||||
error = error || I18n.t("admin.user.delete_posts_failed");
|
||||
bootbox.alert(error);
|
||||
|
@ -236,8 +236,8 @@ const AdminUser = User.extend({
|
|||
.then(() => window.location.reload())
|
||||
.catch((e) => {
|
||||
let error;
|
||||
if (e.responseJSON && e.responseJSON.errors) {
|
||||
error = e.responseJSON.errors[0];
|
||||
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||
error = e.jqXHR.responseJSON.errors[0];
|
||||
}
|
||||
error =
|
||||
error ||
|
||||
|
@ -260,8 +260,8 @@ const AdminUser = User.extend({
|
|||
.then(() => window.location.reload())
|
||||
.catch((e) => {
|
||||
let error;
|
||||
if (e.responseJSON && e.responseJSON.errors) {
|
||||
error = e.responseJSON.errors[0];
|
||||
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||
error = e.jqXHR.responseJSON.errors[0];
|
||||
}
|
||||
error =
|
||||
error ||
|
||||
|
|
Loading…
Reference in New Issue