From 2ae12ee0498869892e91b58c22994914868e2895 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 2 Nov 2020 17:20:18 +0200 Subject: [PATCH] Ignore Knex ECONNRESET errors Knex handles them internally and reconnects. --- src/knexConfig.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/knexConfig.js b/src/knexConfig.js index 3510afe..9741502 100644 --- a/src/knexConfig.js +++ b/src/knexConfig.js @@ -39,6 +39,11 @@ module.exports = { return; } + if (message === "Connection Error: Error: read ECONNRESET") { + // Knex automatically handles the reconnection + return; + } + console.warn(message); }, },