fix(e2e): retain transient classification for admission socket drops

Recognize socket hang up only in transport errors. Test plain and prefixed drops plus HTTP bodies with misleading network text.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-30 08:55:00 -05:00
1 parent a027895ea6
commit 9dbf9ae0d0
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ function admissionReadError(endpoint: AdmissionEndpoint, error: unknown): Remote
} else if (error instanceof Error) {
const message = error.message.slice(0, 256);
if (error.name === "TimeoutError" || /^(?:apiRequestContext\.get: )?Timeout \d+ms exceeded\b/u.test(message)
|| /\b(?:ECONNRESET|ECONNREFUSED|ETIMEDOUT|ENOTFOUND|EAI_AGAIN)\b/u.test(message)) failureClass = "transient_infrastructure";
|| /\b(?:ECONNRESET|ECONNREFUSED|ETIMEDOUT|ENOTFOUND|EAI_AGAIN|socket hang up)\b/iu.test(message)) failureClass = "transient_infrastructure";
}
} catch { /* Unknown rejection values remain a bounded candidate failure. */ }
return new RemoteAdmissionReadError(endpoint, failureClass);