From 2a8efbee09a284be12748ed3962bc9b816965e36 Mon Sep 17 00:00:00 2001 From: Akash Date: Sat, 10 Feb 2024 10:57:50 +0530 Subject: [PATCH] Minor typo correction (#3135) --- docs/pages/apis/client.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/apis/client.mdx b/docs/pages/apis/client.mdx index 340f95c6..081f2954 100644 --- a/docs/pages/apis/client.mdx +++ b/docs/pages/apis/client.mdx @@ -173,7 +173,7 @@ console.log('client has disconnected') client.on('error', (err: Error) => void) => void ``` -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: +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: ```js const client = new pg.Client()