From 8ff88d028c587c610d16d1b385f43ccdb9a2e57b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 4 Jul 2022 16:34:59 +0100 Subject: [PATCH] Removing spam of unauthorised traces from tests, may be causing stack overflow. --- packages/server/src/api/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index ec6ad951f9..f72b959eea 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -72,7 +72,10 @@ router.use(async (ctx, next) => { error, } ctx.log.error(err) - console.trace(err) + // unauthorised errors don't provide a useful trace + if (!env.isTest()) { + console.trace(err) + } } })