GUACAMOLE-1571: Properly wrap upload stream JSON errors.

This commit is contained in:
James Muehlner authored and Mike Jumper committed 2023-05-11 23:39:16 -07:00
1 parent ff4854d8f7
commit 77bd5e116a
1 file changed
+1 -1
@@ -316,7 +316,7 @@ angular.module('rest').factory('tunnelService', ['$injector',
// Parse and reject with resulting JSON error
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
else if (xhr.status >= 400 && xhr.status < 500)