mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-01-12 22:43:34 +08:00
fix: handle postgres dns lookup error (#1433)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user