diff --git a/themes/src/main/resources/theme/base/admin/resources/js/app.js b/themes/src/main/resources/theme/base/admin/resources/js/app.js
index 5f58e88..3052ae9 100755
--- a/themes/src/main/resources/theme/base/admin/resources/js/app.js
+++ b/themes/src/main/resources/theme/base/admin/resources/js/app.js
@@ -1943,6 +1943,8 @@ module.factory('errorInterceptor', function($q, $window, $rootScope, $location,
} else if (response.status) {
if (response.data && response.data.errorMessage) {
Notifications.error(response.data.errorMessage);
+ } else if (response.data && response.data.error_description) {
+ Notifications.error(response.data.error_description);
} else {
Notifications.error("An unexpected server error has occurred");
}
diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
index a2cbea4..a6b0ac1 100755
--- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
+++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/clients.js
@@ -1229,12 +1229,6 @@ module.controller('ClientDetailCtrl', function($scope, realm, client, templates,
}, $scope.clientEdit, function() {
$route.reload();
Notifications.success("Your changes have been saved to the client.");
- }, function(error) {
- if (error.status == 400 && error.data.error_description) {
- Notifications.error(error.data.error_description);
- } else {
- Notifications.error('Unexpected error when updating client');
- }
});
}
};
@@ -1348,12 +1342,6 @@ module.controller('CreateClientCtrl', function($scope, realm, client, templates,
var id = l.substring(l.lastIndexOf("/") + 1);
$location.url("/realms/" + realm.realm + "/clients/" + id);
Notifications.success("The client has been created.");
- }, function(error) {
- if (error.status == 400 && error.data.error_description) {
- Notifications.error(error.data.error_description);
- } else {
- Notifications.error('Unexpected error when creating client');
- }
});
};