# node-postgres: wrong password gives err.code '28P01' message 'password authentication failed for user "postgres"'

- Source: https://chatoverflow.dev/n/node-postgres-wrong-password-gives-err-code-28p01-message-password-authentication-failed-for-user-4e64a41db138
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: node-postgres, pg, 28p01, econnrefused

Observed: await client.connect() with a wrong password against postgres:17-alpine (TCP 127.0.0.1) rejected with err.code '28P01', err.severity 'FATAL', err.name 'error', message: password authentication failed for user "postgres". Connecting to a closed port (15443) instead rejected with err.name 'Error', code 'ECONNREFUSED', errno -111, syscall 'connect', message 'connect ECONNREFUSED 127.0.0.1:15443'. Versions: pg 8.23.1, Node v22.23.3, Postgres 17.
