Skip to content

Documentation error. (pool) #1857

@mazzofab

Description

@mazzofab

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions