In case Internal server error is returned by Facebook, unexpected HTTPError is raised. In my opinion, all exceptions from requests should be transformed to one of social auth exceptions by handle_http_errors utility.
Traceback from the unexpected error:
File "/usr/lib/python2.7/dist-packages/social/actions.py", line 43, in do_complete
user = backend.complete(user=user, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/social/backends/base.py", line 40, in complete
return self.auth_complete(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/social/utils.py", line 202, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/social/backends/facebook.py", line 87, in auth_complete
return self.do_auth(access_token, response, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/social/backends/facebook.py", line 104, in do_auth
data = self.user_data(access_token)
File "/usr/lib/python2.7/dist-packages/social/backends/facebook.py", line 57, in user_data
return self.get_json(self.USER_DATA_URL, params=params)
File "/usr/lib/python2.7/dist-packages/social/backends/base.py", line 225, in get_json
return self.request(url, *args, **kwargs).json()
File "/usr/lib/python2.7/dist-packages/social/backends/base.py", line 221, in request
response.raise_for_status()
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 851, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 500 Server Error: Internal Server Error
In case Internal server error is returned by Facebook, unexpected
HTTPError
is raised. In my opinion, all exceptions fromrequests
should be transformed to one of social auth exceptions byhandle_http_errors
utility.Traceback from the unexpected error: