[FIX] web: log logger warning instead error in assets
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) <xdo@odoo.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user