Skip to content

handle pg connection errors in v6.0.0 #1322

@rafaelcr

Description

@rafaelcr

the API should retry these errors as it did before:

{"level":"error","message":"Cannot connect to pg connect ECONNREFUSED 10.1.233.175:5432","stack":"Error: connect ECONNREFUSED 10.1.233.175:5432\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)\n    at cachedError (/app/node_modules/postgres/cjs/src/query.js:166:23)\n    at new Query (/app/node_modules/postgres/cjs/src/query.js:36:24)\n    at sql (/app/node_modules/postgres/cjs/src/index.js:105:11)\n    at connectPostgres (/app/src/datastore/connection.ts:86:20)","timestamp":"2022-09-20T14:44:38.440Z"}
{"level":"error","message":"app failed to start: Error: connect ECONNREFUSED 10.1.233.175:5432 connect ECONNREFUSED 10.1.233.175:5432","stack":"Error: connect ECONNREFUSED 10.1.233.175:5432\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16)\n    at cachedError (/app/node_modules/postgres/cjs/src/query.js:166:23)\n    at new Query (/app/node_modules/postgres/cjs/src/query.js:36:24)\n    at sql (/app/node_modules/postgres/cjs/src/index.js:105:11)\n    at connectPostgres (/app/src/datastore/connection.ts:86:20)","timestamp":"2022-09-20T14:44:38.444Z"}

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions