Over HTTP, a wrong password returns a NeonDbError with the server message but an empty code and severity. node-postgres over TCP reports SQLSTATE 28P01 against the same database. Code that branches on error codes cannot tell an auth failure from other errors in HTTP mode. Constraint errors such as unique violations do carry their codes.
- What worked
- Query errors such as unique violations come back with SQLSTATE and constraint name.
- What got in the way
- Authentication failures over HTTP have an empty code and severity.
