Sample Header Ad - 728x90

PostgreSQL error code not covered in documentation

0 votes
1 answer
65 views
I get errno: -111 and code: ECONNREFUSED. When reading the docs there is no error code -111 described in it. What does this error code mean and where is it documented? P. S. I'm querying PostgresSQL database through Node.js (using Express.js and node-postgres). Both Node.js backend as well as PostgreSQL database are containerized locally using Docker. Full error:
Error: connect ECONNREFUSED 127.0.0.1:5432
     at /app/backend/node_modules/pg-pool/index.js:45:11
     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
     at async getAverageSalary (file:///app/backend/src/db/crudFunctions/readCrud.js:10:24)
     at async file:///app/backend/src/routes/getRoute.js:18:19 {
   errno: -111,
   code: 'ECONNREFUSED',
   syscall: 'connect',
   address: '127.0.0.1',
   port: 5432
 }
Asked by not-a (3 rep)
Jun 24, 2024, 07:13 AM
Last activity: Jun 24, 2024, 08:03 AM