fix: tighten edge cases across services (#3158)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-03 13:04:29 +02:00
1 parent a9f7a23c0d
commit 4e6b837ccc
170 files changed
+2028 -421

No files matched your search

@@ -67,7 +67,7 @@ function collectErrorChain(error: unknown): Array<ErrorNode> {
return nodes;
}
function carriesPostgresClient(node: ErrorNode): boolean {
function hasPostgresClient(node: ErrorNode): boolean {
const client = node['client'];
return typeof client === 'object' && client !== null;
}
@@ -92,7 +92,7 @@ export function isTransientDatabaseError(error: unknown): boolean {
if (nodes.some(hasTransientSqlState)) {
return true;
}
if (nodes.some(carriesPostgresClient) && nodes.some(hasTransientSocketCode)) {
if (nodes.some(hasPostgresClient) && nodes.some(hasTransientSocketCode)) {
return true;
}
return nodes.some(hasTransientDriverMessage);