From efe41244b6726234557112368a67e5334b04d943 Mon Sep 17 00:00:00 2001 From: Saurabh Choraria Date: Tue, 8 Aug 2023 12:21:33 +0530 Subject: [PATCH] [FIX] auth_signup: update log while SignupError occurs When a user tries to signup in odoo and enters an invalid email address a logger error occurs which creates noise in sentry. Error: SignupError('Login must be a valid email address : tme') The logger is updated to use the 'warning' level instead of the 'error' level. This change reflects a less severe logging level for cases when SignupError occurs while signup. sentry-3933777844 closes odoo/odoo#135343 X-original-commit: b59d0ef1568adc3296534f2dc5542afc02e04b1b Signed-off-by: Achraf Ben Azzouz (abz) Signed-off-by: Saurabh Choraria (sauc) --- addons/auth_signup/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/auth_signup/controllers/main.py b/addons/auth_signup/controllers/main.py index edec161385b..d47881f6ff3 100644 --- a/addons/auth_signup/controllers/main.py +++ b/addons/auth_signup/controllers/main.py @@ -57,8 +57,8 @@ class AuthSignupHome(Home): if request.env["res.users"].sudo().search([("login", "=", qcontext.get("login"))]): qcontext["error"] = _("Another user is already registered using this email address.") else: - _logger.error("%s", e) - qcontext['error'] = _("Could not create a new account.") + _logger.warning("%s", e) + qcontext['error'] = _("Could not create a new account.") + "\n" + str(e) elif 'signup_email' in qcontext: user = request.env['res.users'].sudo().search([('email', '=', qcontext.get('signup_email')), ('state', '!=', 'new')], limit=1)