mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUAC-1430: Wrap error to ensure that required fields are always present.
This commit is contained in:
@@ -155,6 +155,10 @@ angular.module('auth').factory('authenticationService', ['$injector',
|
||||
// If authentication fails, propogate failure to returned promise
|
||||
.error(function authenticationFailed(error) {
|
||||
|
||||
// Ensure error object exists, even if the error response is not
|
||||
// coming from the authentication REST endpoint
|
||||
error = new Error(error);
|
||||
|
||||
// Request credentials if provided credentials were invalid
|
||||
if (error.type === Error.Type.INVALID_CREDENTIALS)
|
||||
$rootScope.$broadcast('guacInvalidCredentials', parameters, error);
|
||||
|
Reference in New Issue
Block a user