From d8ce5de8f72203bce2441847946a588fe81c98c3 Mon Sep 17 00:00:00 2001 From: "ishak jmilou.ishak" Date: Thu, 19 Dec 2024 20:05:48 +0100 Subject: [PATCH] removed try catch --- src/Python/flask/web/static/script.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Python/flask/web/static/script.js b/src/Python/flask/web/static/script.js index 9cef094..2fb6c50 100644 --- a/src/Python/flask/web/static/script.js +++ b/src/Python/flask/web/static/script.js @@ -24,13 +24,10 @@ document.querySelectorAll(".btn").forEach((button) => { // Fetch data from the server async function fetchData() { - try { const response = await fetch("/data"); const data = await response.json(); return data; - } catch (error) { - console.error("Error:", error); - } + } // Parse the data and show it on the website