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:
co-authored by
Claude Opus 5.5
parent
84effd0cd8
commit
f329cc8042
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user