Skip to content
Snippets Groups Projects
Commit 3624a071 authored by std-odoo's avatar std-odoo
Browse files

[FIX] google_gmail: fix google gmail oauth crashing


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

closes odoo/odoo#112290

X-original-commit: 1bf9278b
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: default avatarStéphane Debauche (std) <std@odoo.com>
parent 08ba0fd4
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ class GoogleGmailController(http.Controller): ...@@ -29,7 +29,7 @@ class GoogleGmailController(http.Controller):
raise Forbidden() raise Forbidden()
if error: if error:
return _('An error occur during the authentication process: %s.') % error return _('An error occur during the authentication process.')
try: try:
state = json.loads(state) state = json.loads(state)
...@@ -56,8 +56,8 @@ class GoogleGmailController(http.Controller): ...@@ -56,8 +56,8 @@ class GoogleGmailController(http.Controller):
try: try:
refresh_token, access_token, expiration = record._fetch_gmail_refresh_token(code) refresh_token, access_token, expiration = record._fetch_gmail_refresh_token(code)
except UserError as e: except UserError:
return _('An error occur during the authentication process: %s.') % str(e.name) return _('An error occur during the authentication process.')
record.write({ record.write({
'google_gmail_access_token': access_token, 'google_gmail_access_token': access_token,
......
...@@ -58,7 +58,7 @@ msgstr "" ...@@ -58,7 +58,7 @@ msgstr ""
#: code:addons/google_gmail/controllers/main.py:0 #: code:addons/google_gmail/controllers/main.py:0
#: code:addons/google_gmail/controllers/main.py:0 #: code:addons/google_gmail/controllers/main.py:0
#, python-format #, python-format
msgid "An error occur during the authentication process: %s." msgid "An error occur during the authentication process."
msgstr "" msgstr ""
#. module: google_gmail #. module: google_gmail
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment