Skip to content

Commit

Permalink
fix: handle errors originating from pg
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Nov 10, 2019
1 parent 8777a6c commit 194d1a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/factories/createPool.js
Expand Up @@ -116,7 +116,7 @@ export default (
};

client.on('error', (error) => {
if (error.message.includes('server closed the connection unexpectedly')) {
if (error.message.includes('Connection terminated unexpectedly') || error.message.includes('server closed the connection unexpectedly')) {
client.connection.slonik.terminated = error;
}

Expand Down

0 comments on commit 194d1a6

Please sign in to comment.