Show error message in admin docs panel instead of staying on Loading
Build and Push Docker Image / build-and-push (push) Successful in 38s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-10-19 15:01:41 -04:00
1 parent ad3e0bc7be
commit 3eb6322427
1 file changed
+7 -1
+7 -1
View File
@@ -3296,8 +3296,14 @@ $('#app-settings-form').addEventListener('submit', async (e) => {
let adminDocsEditorInstance = null;
async function loadAdminDocs() {
const { docs } = await api('/api/admin/docs');
const el = $('#admin-docs-list');
let docs;
try {
({ docs } = await api('/api/admin/docs'));
} catch (err) {
el.innerHTML = `<p class="hint" style="color:red">Error loading documents: ${esc(err.message)}</p>`;
return;
}
if (!docs.length) {
el.innerHTML = '<p class="hint">No submitted documents yet.</p>';
return;