fix: add postgres connection error checking for ECONNRESET code

This commit is contained in:
CharlieC3
2022-08-30 11:26:22 -04:00
committed by Charlie
parent 9da4d8a8e6
commit 03a1896cff

View File

@@ -313,6 +313,8 @@ function isPgConnectionError(error: any): string | false {
return 'Postgres connection ETIMEDOUT';
} else if (error.code === 'ENOTFOUND') {
return 'Postgres connection ENOTFOUND';
} else if (error.code === 'ECONNRESET') {
return 'Postgres connection ECONNRESET';
} else if (error.message) {
const msg = (error as Error).message.toLowerCase();
if (msg.includes('database system is starting up')) {