From a2125ac56790c070b684f6e654d27a71eebbca55 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 27 Jul 2023 06:56:10 +0200 Subject: [PATCH] Show error message when strategy loading fails closes #1387 --- src/stores/ftbot.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/stores/ftbot.ts b/src/stores/ftbot.ts index 0e2aa97468..2fab593c3a 100644 --- a/src/stores/ftbot.ts +++ b/src/stores/ftbot.ts @@ -442,6 +442,11 @@ export function createBotSubStore(botId: string, botName: string) { return Promise.resolve(data); } catch (error) { console.error(error); + if (axios.isAxiosError(error)) { + console.error(error.response); + const errMsg = error.response?.data?.detail ?? 'Error fetching history'; + showAlert(errMsg, 'warning'); + } return Promise.reject(error); } },