mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-01-12 22:43:34 +08:00
fix: handle postgres.js connection timeouts (#1424)
This commit is contained in:
@@ -192,6 +192,8 @@ export function isPgConnectionError(error: any): string | false {
|
||||
return 'Postgres connection CONNECTION_DESTROYED';
|
||||
} else if (error.code === 'CONNECTION_CONNECT_TIMEOUT') {
|
||||
return 'Postgres connection CONNECTION_CONNECT_TIMEOUT';
|
||||
} else if (error.code === 'CONNECT_TIMEOUT') {
|
||||
return 'Postgres connection CONNECT_TIMEOUT';
|
||||
} else if (error.message) {
|
||||
const msg = (error as Error).message.toLowerCase();
|
||||
if (msg.includes('database system is starting up')) {
|
||||
|
||||
Reference in New Issue
Block a user