Skip to content

Commit 4a2a342

Browse files
authored
fix: handle postgres.js connection timeouts (#1424)
1 parent b8e79c8 commit 4a2a342

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
@@ -192,6 +192,8 @@ export function isPgConnectionError(error: any): string | false {
192192
return 'Postgres connection CONNECTION_DESTROYED';
193193
} else if (error.code === 'CONNECTION_CONNECT_TIMEOUT') {
194194
return 'Postgres connection CONNECTION_CONNECT_TIMEOUT';
195+
} else if (error.code === 'CONNECT_TIMEOUT') {
196+
return 'Postgres connection CONNECT_TIMEOUT';
195197
} else if (error.message) {
196198
const msg = (error as Error).message.toLowerCase();
197199
if (msg.includes('database system is starting up')) {

0 commit comments

Comments
 (0)