add different error format for 23505 error on postgres

Would you guys like me to submit a failing test for this? Do you guys test this kind of thing?

Also, I tried to find somewhere on postgres where it mapped error codes into error messages but I didn't find it. Any idea on if this exists out there? There might be even more error formats for code 23505 or other codes...
`console.log(err)` - what would that result in?