From 049513ae01dc5931d41e1c368b7b9e285438a88f Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 1 Jan 2022 17:11:21 +0100 Subject: [PATCH] Properly handle full refresh even if one bot is offline --- src/store/modules/botStoreWrapper.ts | 6 +++++- src/store/modules/ftbot/index.ts | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/modules/botStoreWrapper.ts b/src/store/modules/botStoreWrapper.ts index 57ead006..3ed81a2a 100644 --- a/src/store/modules/botStoreWrapper.ts +++ b/src/store/modules/botStoreWrapper.ts @@ -316,7 +316,11 @@ export default function createBotStore(store) { async pingAll({ getters, dispatch }) { await Promise.all( getters.allAvailableBotsList.map(async (e) => { - await dispatch(`${e}/ping`); + try { + await dispatch(`${e}/ping`); + } catch { + // pass + } }), ); }, diff --git a/src/store/modules/ftbot/index.ts b/src/store/modules/ftbot/index.ts index 2d9beaa1..50fa28ad 100644 --- a/src/store/modules/ftbot/index.ts +++ b/src/store/modules/ftbot/index.ts @@ -462,6 +462,7 @@ export function createBotSubStore(botId: string, botName: string) { return Promise.resolve(); } catch (error) { // + commit('setIsBotOnline', false); return Promise.reject(); } },