fix: handle postgres dns lookup error (#1433)

This commit is contained in:
Rafael Cárdenas
2022-11-15 12:14:21 -06:00
committed by GitHub
parent e23963fa92
commit e00efd4e64

View File

@@ -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;