Show error message when strategy loading fails

closes #1387
This commit is contained in:
Matthias 2023-07-27 06:56:10 +02:00
parent ee45a94ec6
commit a2125ac567

View File

@ -442,6 +442,11 @@ export function createBotSubStore(botId: string, botName: string) {
return Promise.resolve(data); return Promise.resolve(data);
} catch (error) { } catch (error) {
console.error(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); return Promise.reject(error);
} }
}, },