From 77bd5e116a855d4170bb9441ef1fb068f9c7b6a9 Mon Sep 17 00:00:00 2001 From: James Muehlner Date: Wed, 30 Mar 2022 23:55:17 +0000 Subject: [PATCH] GUACAMOLE-1571: Properly wrap upload stream JSON errors. --- .../src/main/frontend/src/app/rest/services/tunnelService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js b/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js index 1f0cde50d..33a8d7196 100644 --- a/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js +++ b/guacamole/src/main/frontend/src/app/rest/services/tunnelService.js @@ -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)