1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

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.
This commit is contained in:
Thomas Heartman 2023-06-07 09:37:40 +02:00 committed by GitHub
parent a08c6f3c83
commit 08834a7250
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
);