From 783a3ff26de9d6ac6812a68cbf033a2c5590e7ac Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sat, 19 Dec 2020 03:09:24 +0200 Subject: [PATCH] Make timeouts less noisy in stderr --- backend/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/index.ts b/backend/src/index.ts index d4ee32c6..5e1f82a3 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -103,6 +103,12 @@ function errorHandler(err) { return; } + if (err.message && err.message.startsWith("Request timed out")) { + // These are very noisy, so just print the message without stack. The stack trace doesn't really help here anyway. + console.error(err.message); + return; + } + // tslint:disable:no-console console.error(err);