diff --git a/src/Python/flask/web/static/script.js b/src/Python/flask/web/static/script.js index 109916d..de56ad4 100644 --- a/src/Python/flask/web/static/script.js +++ b/src/Python/flask/web/static/script.js @@ -24,11 +24,15 @@ 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 async function parseData() { const data = await fetchData();