fix(wazuh): preserve degraded production readback
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / build-and-deploy (push) Has been cancelled
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / tests (push) Has been cancelled

This commit is contained in:
ogt
2026-07-14 20:39:55 +08:00
parent 0e28fbc1dc
commit ec9d81ff6d
5 changed files with 25 additions and 12 deletions

View File

@@ -128,7 +128,7 @@ export async function GET() {
const baseUrl = requireHttpsBaseUrl(WAZUH_API_BASE_URL);
if (!baseUrl || !WAZUH_API_USERNAME || !WAZUH_API_PASSWORD) {
return boundaryResponse('misconfigured_missing_server_side_wazuh_env', 503);
return boundaryResponse('misconfigured_missing_server_side_wazuh_env');
}
try {
@@ -143,7 +143,7 @@ export async function GET() {
);
const token = auth.data?.token;
if (!token) {
return boundaryResponse('wazuh_auth_token_missing', 502);
return boundaryResponse('wazuh_auth_token_missing');
}
const [status, agents] = await Promise.all([
@@ -209,6 +209,6 @@ export async function GET() {
},
});
} catch {
return boundaryResponse('wazuh_readonly_metadata_unavailable', 502);
return boundaryResponse('wazuh_readonly_metadata_unavailable');
}
}