From 07c77fef483ae72a1168314343bb28eb9066af9d Mon Sep 17 00:00:00 2001 From: Martin Quarda Date: Tue, 8 Oct 2024 09:28:56 +0200 Subject: [PATCH] error handling --- frontend/src/scripts/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/scripts/index.js b/frontend/src/scripts/index.js index f9334ae..f392039 100644 --- a/frontend/src/scripts/index.js +++ b/frontend/src/scripts/index.js @@ -97,6 +97,12 @@ class Main extends Component { window.open(data.redirect ,"_self") } } + }).catch((error) => { + this.setState({ + progress: false, + text: "Chyba: " + error.status +", " + error.statusText, + status: "failed", + }) }); } togglefaq(){