GUACAMOLE-526: Move handling of request error notification to guacNotification, resolving circular dependency.
This commit is contained in:
1 parent
266b445c21
commit
ae6b5fc8bb
10 files changed
+26
-41
No files matched your search
@@ -25,9 +25,8 @@ angular.module('rest').factory('requestService', ['$injector',
|
||||
function requestService($injector) {
|
||||
|
||||
// Required services
|
||||
var $http = $injector.get('$http');
|
||||
var $log = $injector.get('$log');
|
||||
var guacNotification = $injector.get('guacNotification');
|
||||
var $http = $injector.get('$http');
|
||||
var $log = $injector.get('$log');
|
||||
|
||||
// Required types
|
||||
var Error = $injector.get('Error');
|
||||
@@ -116,19 +115,6 @@ angular.module('rest').factory('requestService', ['$injector',
|
||||
$log.warn(error.type, error.message || error.translatableMessage);
|
||||
});
|
||||
|
||||
/**
|
||||
* Promise error callback which displays a modal notification for all
|
||||
* rejections due to REST errors. The message displayed to the user within
|
||||
* the notification is provided by the contents of the @link{Error} object
|
||||
* within the REST response. All other rejections, such as those due to
|
||||
* JavaScript errors, are logged to the browser console without displaying
|
||||
* any notification.
|
||||
*
|
||||
* @constant
|
||||
* @type Function
|
||||
*/
|
||||
service.SHOW_NOTIFICATION = service.createErrorCallback(guacNotification.showRequestError);
|
||||
|
||||
return service;
|
||||
|
||||
}]);
|
||||
Reference in new issue
Block a user