-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Milestone
Description
I think there is an error in the docs.
// promise - checkout a client
pool.connect()
.then(client => {
return client.query('SELECT * FROM users WHERE id = $1', [1])
.then(res => {
client.release()
console.log(res.rows[0])
})
.catch(e => {
client.release()
console.log(err.stack)
})
})
The catch part should be .catch(err => ....
Metadata
Metadata
Assignees
Labels
No labels