From 6d4f43c2ea14c3b6b879acd71badb79d90664520 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Thu, 2 Feb 2023 10:32:50 +0100 Subject: [PATCH] give correct error message --- pages/player.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/player.vue b/pages/player.vue index 66548101..50feac71 100644 --- a/pages/player.vue +++ b/pages/player.vue @@ -852,7 +852,7 @@ async function generatePlaylist() { let payload = { method: 'POST', - headers: authStore.authHeader, + headers: { ...contentType, ...authStore.authHeader }, } as Payload if (selectedFolders.value.length > 0 && !generateFromAll.value) { @@ -875,9 +875,9 @@ async function generatePlaylist() { indexStore.showAlert = false }, 2000) }) - .catch((e: string) => { + .catch((e: any) => { indexStore.alertVariant = 'alert-danger' - indexStore.alertMsg = e + indexStore.alertMsg = e.data ? e.data : e indexStore.showAlert = true setTimeout(() => {