fix(telemetry): keep a never-sent unauthenticated request out of api.request.failed (03-07)

With no credential V3 sends nothing and returns UNAUTHENTICATED without a
status, yet it was counted as an API failure, so signed-out states raised
the failure rate. Diagnostics still record it once; telemetry does not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-09-25 22:52:18 +09:00
co-authored by Claude Opus 5.5
parent 84effd0cd8
commit f329cc8042
3 changed files with 48 additions and 1 deletions
+7
View File
@@ -285,6 +285,13 @@ function isTerminalNonAbortFailure(
): boolean {
if (observation.outcome === "SUCCESS") return false;
if (observation.outcome === "CANCELLED") return false;
// 03-07. No credential, nothing sent: a client state, not an API failure.
if (
observation.outcome === "UNAUTHENTICATED" &&
observation.status === undefined
) {
return false;
}
if (
observation.cancellationOwner !== undefined &&
CALLER_OWNED_CANCELLATION.has(observation.cancellationOwner)