Skip to content

Commit 7904fea

Browse files
author
Simone Nigro
committed
fix(client): handle unexpected copyInResponse in non-query state
1 parent c42122a commit 7904fea

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/pg/lib/client.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,9 @@ class Client extends EventEmitter {
544544
if (activeQuery) {
545545
const error = new Error('COPY operations are not supported in pipeline mode')
546546
activeQuery.handleError(error, this.connection)
547+
} else {
548+
const error = new Error('Received unexpected copyInResponse message from backend.')
549+
this._handleErrorEvent(error)
547550
}
548551
return
549552
}

0 commit comments

Comments
 (0)