Skip to content

Commit

Permalink
Show error message when strategy loading fails
Browse files Browse the repository at this point in the history
closes #1387
  • Loading branch information
xmatthias committed Jul 27, 2023
1 parent ee45a94 commit a2125ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stores/ftbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},
Expand Down

0 comments on commit a2125ac

Please sign in to comment.