[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) <abz@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
This commit is contained in:
Saurabh Choraria
2023-09-14 04:42:43 +00:00
parent 4e74693384
commit efe41244b6
+2 -2
View File
@@ -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)