fix(health): suppress 404 when health monitor disabled + fix audit test assertion
- Sidebar.svelte: defer healthStore.refresh() until feature flags confirm health_monitor is enabled; skip entirely when disabled - health.js: remove throw error from catch block — log and return null instead, preventing 'Uncaught (in promise)' on expected 404 - test_report_audit_immutability.py: fix mock assertions — audit_service uses logger.reason/reflect/explore, not logger.info - HealthStore and Sidebar now produce zero network noise when FEATURES__HEALTH_MONITOR=false
This commit is contained in:
@@ -47,6 +47,8 @@
|
||||
// postApi returns the JSON data directly or throws an error
|
||||
const data = await api.postApi(
|
||||
`/git/repositories/${encodeURIComponent(String(dashboardId))}/generate-message${envId ? `?env_id=${encodeURIComponent(String(envId))}` : ""}`,
|
||||
undefined,
|
||||
{ suppressToast: true },
|
||||
);
|
||||
message = data.message;
|
||||
toast($t.git?.commit_message_generated, "success");
|
||||
|
||||
@@ -207,7 +207,11 @@
|
||||
await loadWorkspace();
|
||||
} catch (_e) {
|
||||
initialized = false;
|
||||
configs = await gitService.getConfigs();
|
||||
try {
|
||||
configs = await gitService.getConfigs();
|
||||
} catch (_e2) {
|
||||
configs = [];
|
||||
}
|
||||
const defaultConfig = resolveDefaultConfig(configs);
|
||||
if (defaultConfig?.id) selectedConfigId = defaultConfig.id;
|
||||
} finally {
|
||||
@@ -272,6 +276,8 @@
|
||||
try {
|
||||
const data = await api.postApi(
|
||||
`/git/repositories/${encodeURIComponent(String(dashboardId))}/generate-message${envId ? `?env_id=${encodeURIComponent(String(envId))}` : ''}`,
|
||||
undefined,
|
||||
{ suppressToast: true },
|
||||
);
|
||||
commitMessage = data?.message || '';
|
||||
toast($t.git?.commit_message_generated || 'Сообщение для коммита сгенерировано', 'success');
|
||||
|
||||
Reference in New Issue
Block a user