[FIX] google_gmail: fix google gmail oauth crashing

Bug
===
When an error occurs, the error received is wrongly stringified.

closes odoo/odoo#112504

X-original-commit: b0641c5e85bf9d2e2c64ba548f7243e0a4196602
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
This commit is contained in:
std-odoo
2023-02-13 14:05:21 +01:00
parent e75ea7db53
commit 6cc8cec5f1
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -29,7 +29,7 @@ class GoogleGmailController(http.Controller):
raise Forbidden()
if error:
return _('An error occur during the authentication process: %s.', error)
return _('An error occur during the authentication process.')
try:
state = json.loads(state)
@@ -56,8 +56,8 @@ class GoogleGmailController(http.Controller):
try:
refresh_token, access_token, expiration = record._fetch_gmail_refresh_token(code)
except UserError as e:
return _('An error occur during the authentication process: %s.', str(e.name))
except UserError:
return _('An error occur during the authentication process.')
record.write({
'google_gmail_access_token': access_token,
+1 -1
View File
@@ -63,7 +63,7 @@ msgstr ""
#: code:addons/google_gmail/controllers/main.py:0
#: code:addons/google_gmail/controllers/main.py:0
#, python-format
msgid "An error occur during the authentication process: %s."
msgid "An error occur during the authentication process."
msgstr ""
#. module: google_gmail