mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1571: Properly wrap upload stream JSON errors.
This commit is contained in:
committed by
Mike Jumper
parent
ff4854d8f7
commit
77bd5e116a
@@ -316,7 +316,7 @@ angular.module('rest').factory('tunnelService', ['$injector',
|
|||||||
|
|
||||||
// Parse and reject with resulting JSON error
|
// Parse and reject with resulting JSON error
|
||||||
else if (xhr.getResponseHeader('Content-Type') === 'application/json')
|
else if (xhr.getResponseHeader('Content-Type') === 'application/json')
|
||||||
deferred.reject(angular.fromJson(xhr.responseText));
|
deferred.reject(new Error(angular.fromJson(xhr.responseText)));
|
||||||
|
|
||||||
// Warn of lack of permission of a proxy rejects the upload
|
// Warn of lack of permission of a proxy rejects the upload
|
||||||
else if (xhr.status >= 400 && xhr.status < 500)
|
else if (xhr.status >= 400 && xhr.status < 500)
|
||||||
|
Reference in New Issue
Block a user