Properly handle full refresh even if one bot is offline

This commit is contained in:
Matthias 2022-01-01 17:11:21 +01:00
parent 514c8da51a
commit 049513ae01
2 changed files with 6 additions and 1 deletions

View File

@ -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
}
}),
);
},

View File

@ -462,6 +462,7 @@ export function createBotSubStore(botId: string, botName: string) {
return Promise.resolve();
} catch (error) {
//
commit('setIsBotOnline', false);
return Promise.reject();
}
},