From 08834a7250551b28ea643c0eb52a7d18603a6d86 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Wed, 7 Jun 2023 09:37:40 +0200 Subject: [PATCH] chore: lower log-level for unexpected errors (#3837) This change lowers the log level from warning to debug for when we see unexpected error types. Right now this triggers for Joi errors, which we still rely on pretty heavily. Lowering this should clear up logs for most users. --- src/lib/routes/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/routes/util.ts b/src/lib/routes/util.ts index af2a566753..207eb5c047 100644 --- a/src/lib/routes/util.ts +++ b/src/lib/routes/util.ts @@ -30,8 +30,8 @@ export const handleErrors: ( error instanceof UnleashError ? error : fromLegacyError(error); if (!(error instanceof UnleashError)) { - logger.warn( - `I encountered an error that wasn't an instance of the \`UnleashError\` type. This probably means that we had an unexpected crash. The original error and what it was mapped to are:`, + logger.debug( + `I encountered an error that wasn't an instance of the \`UnleashError\` type. The original error and what it was mapped to are:`, error, finalError, );