From fc5028596f3151ea156fc81aded857f0bd222047 Mon Sep 17 00:00:00 2001 From: Diego Noceda Date: Wed, 26 Feb 2025 13:30:33 +0100 Subject: [PATCH] Let the catch handle the error --- frontend/src/widgets/resultsummary.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/widgets/resultsummary.js b/frontend/src/widgets/resultsummary.js index b7583414..d4c0f1dc 100644 --- a/frontend/src/widgets/resultsummary.js +++ b/frontend/src/widgets/resultsummary.js @@ -45,9 +45,6 @@ const ResultSummaryWidget = ( props ) => { HttpClient.get([Settings.serverUrl, 'widget', 'result-summary'], params) .then(response => { response = HttpClient.handleResponse(response, 'response'); - if (!response.ok) { - throw Error(response.statusText); - } return response.json(); }) .then(data => { @@ -57,6 +54,7 @@ const ResultSummaryWidget = ( props ) => { }) .catch(error => { setDataError(true); + setIsLoading(false); console.log(error); }); }, [params]);