This commit is contained in:
mixedpuppy 2010-09-07 13:39:53 -07:00
Родитель 304e606efc
Коммит 39ac221f73
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -127,14 +127,13 @@ class api():
elif 'error' in response:
error = {'provider': domain,
'reason': response['error'].get('message'),
'type': response['error'].get('type')
'type': response['error'].get('type'),
'code': int(resp['status'])
}
if response['error'].get('type')=="OAuthInvalidRequestException":
# status will be 401 if we need to reauthorize
error['code'] = int(resp['status'])
else:
error = {'provider': domain,
'reason': "unexpected facebook response: %r"% (response,)
'reason': "unexpected facebook response: %r"% (response,),
'code': int(resp['status'])
}
log.error("unexpected facebook response: %r", response)
return result, error