Skip to content

Commit e00efd4

Browse files
authored
fix: handle postgres dns lookup error (#1433)
1 parent e23963f commit e00efd4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/datastore/helpers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ export function isPgConnectionError(error: any): string | false {
208208
return 'Postgres client has encountered a connection error and is not queryable';
209209
} else if (msg.includes('terminating connection due to unexpected postmaster exit')) {
210210
return 'Postgres connection terminating due to unexpected postmaster exit';
211+
} else if (msg.includes('getaddrinfo eai_again')) {
212+
return 'Postgres connection failed due to a DNS lookup error';
211213
}
212214
}
213215
return false;

0 commit comments

Comments
 (0)