Propagate social exceptions as auth denied response instead of crashing
Propagate social exceptions as auth denied response instead of crashing

python-social-auth may raise authentication-related exceptions while executing the pipeline.
For example, an InvalidEmail exception may be raised in the mail pipeline.

This used to result in a crash handled by generic last-resort error 500 handler. This patch
handles all authentication errors raised inside the pipeline and signals them nicely in a
401 Access Denied response which includes the error description.

In the case of the aforementioned InvalidEmail exception this will be returned as a response:
{"error_description":"Email couldn't be validated","error":"access_denied"}

PhilipGarnero/django-rest-framework-social-oauth2