From 85e9cafe9478d042380b83eea1246f1ecae0ed07 Mon Sep 17 00:00:00 2001 From: Thomas Kurz Date: Fri, 29 Mar 2024 08:01:12 +0100 Subject: [PATCH 1/2] #227 show detailed error messages on study start --- src/stores/studyStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/studyStore.ts b/src/stores/studyStore.ts index ed2f94cb..c98b9091 100644 --- a/src/stores/studyStore.ts +++ b/src/stores/studyStore.ts @@ -67,7 +67,7 @@ export const useStudyStore = defineStore('study', () => { }); }) .catch((e: AxiosError) => { - alert('Could not update study status'); + alert(`Could not update study status: ${(e.response?.data as any)?.message}`); handleIndividualError( e, 'Could not update study status' + study.value.studyId @@ -80,7 +80,7 @@ export const useStudyStore = defineStore('study', () => { study.value.status = status; }) .catch((e: AxiosError) => { - alert('Could not update study status'); + alert(`Could not update study status: ${(e.response?.data as any)?.message}`); handleIndividualError( e, 'Could not update study status' + study.value.studyId From 3359d3c0a6180011c51101bafa16d3e6b5902cfe Mon Sep 17 00:00:00 2001 From: Jakob Frank Date: Tue, 2 Apr 2024 09:02:10 +0200 Subject: [PATCH 2/2] Fix linting --- src/stores/studyStore.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/stores/studyStore.ts b/src/stores/studyStore.ts index c98b9091..9a4b3a8e 100644 --- a/src/stores/studyStore.ts +++ b/src/stores/studyStore.ts @@ -67,7 +67,11 @@ export const useStudyStore = defineStore('study', () => { }); }) .catch((e: AxiosError) => { - alert(`Could not update study status: ${(e.response?.data as any)?.message}`); + alert( + `Could not update study status: ${ + (e.response?.data as any)?.message + }` + ); handleIndividualError( e, 'Could not update study status' + study.value.studyId @@ -80,7 +84,11 @@ export const useStudyStore = defineStore('study', () => { study.value.status = status; }) .catch((e: AxiosError) => { - alert(`Could not update study status: ${(e.response?.data as any)?.message}`); + alert( + `Could not update study status: ${ + (e.response?.data as any)?.message + }` + ); handleIndividualError( e, 'Could not update study status' + study.value.studyId