From 356ae6bfef20ec55d32711ed75b761e860afbe11 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Thu, 10 Oct 2024 09:42:55 +0000 Subject: [PATCH] Display Zimfarm error on UI --- ui/src/stores/main.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/src/stores/main.ts b/ui/src/stores/main.ts index f461971..a27e289 100644 --- a/ui/src/stores/main.ts +++ b/ui/src/stores/main.ts @@ -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) }