From eb0cc88ba549eb2f77c16c1ab1bdacb96fb6f95a Mon Sep 17 00:00:00 2001 From: Mahamadasif Ansari Date: Wed, 20 Mar 2024 16:47:51 +0530 Subject: [PATCH] [FIX] web: log logger warning instead error in assets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, log level error mesage occur when`ValueError` is catched by line [1]. This commit changes 'logger.error' to 'logger.warning' with filename to log message instead of error since this is not an actual error of the codebase. [1]-https://github.com/odoo/odoo/blob/3932c46f914c40be4b0629771d1981cdf289df26/addons/web/controllers/binary.py#L131 sentry-4657682601 closes odoo/odoo#158342 Signed-off-by: Xavier Dollé (xdo) --- addons/web/controllers/binary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/controllers/binary.py b/addons/web/controllers/binary.py index a1a66adc80f..6b556bbb677 100644 --- a/addons/web/controllers/binary.py +++ b/addons/web/controllers/binary.py @@ -129,7 +129,7 @@ class Binary(http.Controller): elif js and bundle.javascripts: attachment = bundle.js() except ValueError as e: - _logger.error(e.args[0]) + _logger.warning("Parsing asset bundle %s has failed: %s", filename, e) raise request.not_found() from e if not attachment: raise request.not_found()