Skip to content

Commit

Permalink
Merge pull request #83 from openzim/zimfarm_errors
Browse files Browse the repository at this point in the history
Display Zimfarm error on UI
  • Loading branch information
benoit74 authored Oct 10, 2024
2 parents d170e0e + 356ae6b commit 00390cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/src/stores/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ export const useMainStore = defineStore('main', {
handleError(message: string, error: unknown) {
if (error instanceof AxiosError && error.response) {
console.error(message, ':', error.response.status, error.response.statusText)
if (error.response.data.detail) {
message = message + ': ' + error.response.data.detail
}
} else {
console.error(message, ':', error)
}
Expand Down

0 comments on commit 00390cf

Please sign in to comment.