[FIX] google_calendar: log google bad requests reason

For debugging easyness.
For instance, when trying to sync an event with an attendee
with a wrong email, google failed, it's wasn't easy
to know why from the logs

It is now a bit easier.

opw-646369
This commit is contained in:
Denis Ledoux 2015-08-04 18:49:43 +02:00
parent a56319c390
commit dd500b34b7
1 changed files with 3 additions and 3 deletions

View File

@ -163,13 +163,13 @@ class google_service(osv.osv_memory):
except:
pass
except urllib2.HTTPError, e:
if e.code in (400, 401, 410):
raise e
elif e.code in (204, 404):
if e.code in (204, 404):
status = e.code
response = ""
else:
_logger.exception("Bad google request : %s !" % e.read())
if e.code in (400, 401, 410):
raise e
raise self.pool.get('res.config.settings').get_config_warning(cr, _("Something went wrong with your request to google"), context=context)
return (status, response, ask_time)