From 00fc4b4270ff8872b07524c4d588a83b52d219de Mon Sep 17 00:00:00 2001 From: James Muehlner Date: Tue, 2 May 2023 19:54:53 +0000 Subject: [PATCH] GUACAMOLE-926: Reject file-level errors in csv parser to ensure proper bubbling. --- .../src/app/import/services/connectionCSVService.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guacamole/src/main/frontend/src/app/import/services/connectionCSVService.js b/guacamole/src/main/frontend/src/app/import/services/connectionCSVService.js index 18a024865..641318b5b 100644 --- a/guacamole/src/main/frontend/src/app/import/services/connectionCSVService.js +++ b/guacamole/src/main/frontend/src/app/import/services/connectionCSVService.js @@ -389,17 +389,17 @@ angular.module('import').factory('connectionCSVService', // Fail if the name wasn't provided. Note that this is a file-level // error, not specific to any connection. if (!nameGetter) - throw new ParseError({ + deferred.reject(new ParseError({ message: 'The connection name must be provided', key: 'IMPORT.ERROR_REQUIRED_NAME_FILE' - }); + })); // Fail if the protocol wasn't provided if (!protocolGetter) - throw new ParseError({ + deferred.reject(new ParseError({ message: 'The connection protocol must be provided', key: 'IMPORT.ERROR_REQUIRED_PROTOCOL_FILE' - }); + })); // The function to transform a CSV row into a connection object deferred.resolve(function transformCSVRow(row) {