Add error display for status panel failures
Build and Push Docker Image / build (push) Successful in 50s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m8s
CI / Security audit (push) Successful in 1m20s
CI / Tests & coverage (push) Has been cancelled
Build and Push Docker Image / build (push) Successful in 50s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m8s
CI / Security audit (push) Successful in 1m20s
CI / Tests & coverage (push) Has been cancelled
- Show error message when status API returns error (e.g., 403 for non-admin) - Helps debug why status panel appears empty
This commit is contained in:
@@ -49,6 +49,11 @@ export async function refreshStatusPanel() {
|
|||||||
if (result.success) {
|
if (result.success) {
|
||||||
console.log('[Status] Got status data, rendering...');
|
console.log('[Status] Got status data, rendering...');
|
||||||
renderStatusPanel(result.data, panel);
|
renderStatusPanel(result.data, panel);
|
||||||
|
} else {
|
||||||
|
console.error('[Status] API returned error:', result.error);
|
||||||
|
if (contentDiv && (!contentDiv.innerHTML || contentDiv.innerHTML.includes('status-loading'))) {
|
||||||
|
contentDiv.innerHTML = '<p class="status-error">Failed to load status: ' + result.error + '</p>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('[Status] Error fetching status:', err);
|
console.error('[Status] Error fetching status:', err);
|
||||||
|
|||||||
Reference in New Issue
Block a user