Postgress error connecting: endpoint cant' be found

Question: I keep encounerting this error with the postgres database:

Console request failed: endpoint cannot be found

2024-05-21 14:36:01.98

d5450a65

User

at Parser.parseErrorMessage (/home/runner/2e3a5d4d-c305-404f-923e-dae6c0dc9dd2/node_modules/pg-protocol/dist/parser.js:283:98)

2024-05-21 14:36:01.98

d5450a65

User

at Parser.parse (/home/runner/2e3a5d4d-c305-404f-923e-dae6c0dc9dd2/node_modules/pg-protocol/dist/parser.js:35:38)

2024-05-21 14:36:01.98

d5450a65

User

at TLSSocket.emit (node:events:518:28)

2024-05-21 14:36:01.98

d5450a65

User

at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)

2024-05-21 14:36:01.98

d5450a65

User

at Readable.push (node:internal/streams/readable:390:5)

2024-05-21 14:36:01.98

d5450a65

User

position: undefined,

2024-05-21 14:36:01.98

d5450a65

User

schema: undefined,

2024-05-21 14:36:01.98

d5450a65

User

column: undefined,

2024-05-21 14:36:01.98

d5450a65

User

line: undefined,

2024-05-21 14:36:01.98

d5450a65

User

}

2024-05-21 14:36:01.98

d5450a65

User

Error inserting transactions: error: Console request failed: endpoint cannot be found

2024-05-21 14:36:01.98

d5450a65

User

at Parser.handlePacket (/home/runner/2e3a5d4d-c305-404f-923e-dae6c0dc9dd2/node_modules/pg-protocol/dist/parser.js:122:29)

2024-05-21 14:36:01.98

d5450a65

User

at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23) {

2024-05-21 14:36:01.98

d5450a65

User

length: 69,

2024-05-21 14:36:01.98

d5450a65

User

code: 'XX000',

It works on dev, but not on deploy as well