Skip to content

Commit

Permalink
Let the catch handle the error
Browse files Browse the repository at this point in the history
  • Loading branch information
Fynardo committed Feb 26, 2025
1 parent c455344 commit fc50285
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions frontend/src/widgets/resultsummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -57,6 +54,7 @@ const ResultSummaryWidget = ( props ) => {
})
.catch(error => {
setDataError(true);
setIsLoading(false);
console.log(error);
});
}, [params]);
Expand Down

0 comments on commit fc50285

Please sign in to comment.