From c65cb90b0c832e40ad3d9abf4044b8ae1c1cd057 Mon Sep 17 00:00:00 2001 From: szschaler Date: Tue, 13 Feb 2024 16:34:35 +0000 Subject: [PATCH] Correctly report all errors loading an activities file. --- platform/src/ActivityManager.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/src/ActivityManager.js b/platform/src/ActivityManager.js index 17c39ed..d632ecb 100644 --- a/platform/src/ActivityManager.js +++ b/platform/src/ActivityManager.js @@ -123,14 +123,12 @@ class ActivityManager { let errors = []; let fileContent - try{ + try { let file = this.fileHandler.fetchFile( this.activitiesUrl , urlParamPrivateRepo() ); fileContent = file.content; } catch (e) { - if (e instanceof DOMException){ - errors.push( new EducationPlatformError(`The activity configuration file was not accessible at: ${this.activitiesUrl}. - Check the activity file is available at the given url.`) ); - } + errors.push( new EducationPlatformError(`The activity configuration file was not accessible at: ${this.activitiesUrl}. + Check the activity file is available at the given url and you have the correct access rights.`) ); } if (fileContent != null){