Skip to content

Commit 2a8efbe

Browse files
authored
Minor typo correction (#3135)
1 parent 81c287a commit 2a8efbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/pages/apis/client.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ console.log('client has disconnected')
173173
client.on('error', (err: Error) => void) => void
174174
```
175175

176-
When the client is in the process of connecting, dispatching a query, or disconnecting it will catch and foward errors from the PostgreSQL server to the respective `client.connect` `client.query` or `client.end` promise; however, the client maintains a long-lived connection to the PostgreSQL back-end and due to network partitions, back-end crashes, fail-overs, etc the client can (and over a long enough time period _will_) eventually be disconnected while it is idle. To handle this you may want to attach an error listener to a client to catch errors. Here's a contrived example:
176+
When the client is in the process of connecting, dispatching a query, or disconnecting it will catch and forward errors from the PostgreSQL server to the respective `client.connect` `client.query` or `client.end` promise; however, the client maintains a long-lived connection to the PostgreSQL back-end and due to network partitions, back-end crashes, fail-overs, etc the client can (and over a long enough time period _will_) eventually be disconnected while it is idle. To handle this you may want to attach an error listener to a client to catch errors. Here's a contrived example:
177177

178178
```js
179179
const client = new pg.Client()

0 commit comments

Comments
 (0)