[FIX] core: NotFound error without warning

The conditionnal `isinstance(exc, NotFound)` is shadowed by the
conditionnal `isinstance(exc, HTTPException)` two lines above. Nobody
ever complained that the warning for NotFound error was gone. Since
werkzeug 1.0.0, the status code in the response log is colored, 404 is
colored yellow which should catch the eye. The explicit warning line
isn't really necessary.

closes odoo/odoo#159895

X-original-commit: 851b91f19b87446662421cb8d801a9472725bc72
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
This commit is contained in:
Julien Castiaux
2024-04-08 09:27:27 +00:00
parent 439ad27b9f
commit 851133ff06
+1 -1
View File
@@ -2205,7 +2205,7 @@ class Application:
pass
elif isinstance(exc, SessionExpiredException):
_logger.info(exc)
elif isinstance(exc, (UserError, AccessError, NotFound)):
elif isinstance(exc, (UserError, AccessError)):
_logger.warning(exc)
else:
_logger.error("Exception during request handling.", exc_info=True)