From 052178b084c63f141b8c3e3df8df9a65a28d379f Mon Sep 17 00:00:00 2001 From: Momentry Studio Date: Tue, 27 Oct 2026 01:27:34 +0800 Subject: [PATCH] fix: improve Settings page error message for MarkBase config failures - loadSettings now shows detailed error from MarkBase response body - MarkBase /api/v2/config returns 500 when config file is incomplete - Error message now includes actual error details instead of just HTTP status --- src/views/AdminView.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/AdminView.vue b/src/views/AdminView.vue index ebe9ee5..3ddc8c0 100644 --- a/src/views/AdminView.vue +++ b/src/views/AdminView.vue @@ -1037,7 +1037,11 @@ async function loadSettings() { saveMessage.value = '' try { const resp = await fetch(`${markbaseUrl.value}/api/v2/config`) - if (!resp.ok) throw new Error(`HTTP ${resp.status}`) + if (!resp.ok) { + // MarkBase config may return 500 if config file is incomplete + const errData = await resp.json().catch(() => null) + throw new Error(`HTTP ${resp.status}: ${errData?.error || resp.statusText}`) + } const cfg = await resp.json() uploadPath.value = cfg.server?.upload_path || '' } catch (e: any) {