FIX: Error messages from editing user being swallowed (#10908)

FIX: Error messages from editing user being swallowed (#10908)

diff --git a/app/assets/javascripts/admin/addon/models/admin-user.js b/app/assets/javascripts/admin/addon/models/admin-user.js
index 8d4b38b..4a58d21 100644
--- a/app/assets/javascripts/admin/addon/models/admin-user.js
+++ b/app/assets/javascripts/admin/addon/models/admin-user.js
@@ -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 ||

GitHub sha: b19e8ea2

This commit appears in #10908 which was approved by eviltrout. It was merged by markvanlan.