From e00efd4e64a3f0072ffa103e9ec011e5a080e7ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20C=C3=A1rdenas?= Date: Tue, 15 Nov 2022 12:14:21 -0600 Subject: [PATCH] fix: handle postgres dns lookup error (#1433) --- src/datastore/helpers.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/datastore/helpers.ts b/src/datastore/helpers.ts index c22dfd1a..b8d061d0 100644 --- a/src/datastore/helpers.ts +++ b/src/datastore/helpers.ts @@ -208,6 +208,8 @@ export function isPgConnectionError(error: any): string | false { return 'Postgres client has encountered a connection error and is not queryable'; } else if (msg.includes('terminating connection due to unexpected postmaster exit')) { return 'Postgres connection terminating due to unexpected postmaster exit'; + } else if (msg.includes('getaddrinfo eai_again')) { + return 'Postgres connection failed due to a DNS lookup error'; } } return false;