Added expected errort handling (#2368)

This commit is contained in:
sunghyunkang1111
2026-02-09 14:34:40 -06:00
committed by GitHub
parent 67250f0f6b
commit 3f959e2235
8 changed files with 592 additions and 5 deletions

View File

@@ -15,6 +15,11 @@ export const reportUnhealthy = (scenario: MetricScenario, platform: Platform, ap
send({ platform, api, scenario, healthy: false });
const send = async (event: MetricEvent): Promise<Response> => {
// Skip metrics emission during local development
if (process.env.NODE_ENV === "development") {
return Promise.resolve(new Response(null, { status: 200 }));
}
const url = createUri(configContext?.PORTAL_BACKEND_ENDPOINT, RELATIVE_PATH);
const authHeader = getAuthorizationHeader();