mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1384: Merge ensure all $http error objects are wrapped in Guacamole error objects
This commit is contained in:
@@ -56,6 +56,11 @@ angular.module('rest').factory('requestService', ['$injector',
|
||||
if (response.data)
|
||||
throw new Error(response.data);
|
||||
|
||||
// Fall back to a generic internal error if the request couldn't
|
||||
// even be issued (webapp is down, etc.)
|
||||
else if ('data' in response)
|
||||
throw new Error({ message : 'Unknown failure sending HTTP request' });
|
||||
|
||||
// The value provided is not actually a response object from
|
||||
// the $http service
|
||||
throw response;
|
||||
|
Reference in New Issue
Block a user