Skip to content

Commit 03a1896

Browse files
committed
fix: add postgres connection error checking for ECONNRESET code
1 parent 9da4d8a commit 03a1896

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/datastore/postgres-store.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ function isPgConnectionError(error: any): string | false {
313313
return 'Postgres connection ETIMEDOUT';
314314
} else if (error.code === 'ENOTFOUND') {
315315
return 'Postgres connection ENOTFOUND';
316+
} else if (error.code === 'ECONNRESET') {
317+
return 'Postgres connection ECONNRESET';
316318
} else if (error.message) {
317319
const msg = (error as Error).message.toLowerCase();
318320
if (msg.includes('database system is starting up')) {

0 commit comments

Comments
 (0)