mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-02 10:44:52 +01:00
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:
1 parent
a027895ea6
commit
9dbf9ae0d0
2 files changed
+4
-2
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user