From ad3b765762e0e53e94f1a38346b38cd820f8ef13 Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Thu, 7 Mar 2024 10:26:26 +0100 Subject: [PATCH] Change log level for 404 to info. Error was causing these to show up in sentry causing a lot of noise. --- lms/views/api/exceptions.py | 2 +- lms/views/exceptions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/views/api/exceptions.py b/lms/views/api/exceptions.py index a93863b904..4b30eb66d3 100644 --- a/lms/views/api/exceptions.py +++ b/lms/views/api/exceptions.py @@ -221,7 +221,7 @@ def forbidden(self): @notfound_view_config() def notfound(self): - LOG.error("Page not found: %s", self.request.url) + LOG.info("Page not found: %s", self.request.url) self.request.response.status_int = 404 return ErrorBody(message=_("Endpoint not found.")) diff --git a/lms/views/exceptions.py b/lms/views/exceptions.py index f5cdb3f59e..094b6ab124 100644 --- a/lms/views/exceptions.py +++ b/lms/views/exceptions.py @@ -27,7 +27,7 @@ def __init__(self, exception, request): @notfound_view_config() def notfound(self): - LOG.error("Page not found: %s", self.request.url) + LOG.info("Page not found: %s", self.request.url) return self.error_response(404, _("Page not found")) @forbidden_view_config()