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) {