Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAP-37017 Fix how we build AuthExceptions #664

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

john-westcott-iv
Copy link
Member

The AuthException class from social_core.exceptions takes a first parameter of a backend and a second of a message. Since we only had one parameter when we constructed our AuthException, printing it may be black:

In [6]: from social_core.exceptions import AuthException
In [7]: try:
   ...:     raise AuthException(None, 'Testing')
   ...: except AuthException as e:
   ...:     print(f'AuthException: {e}')
   ...: 
AuthException: Testing

In [8]: try:
   ...:     raise AuthException('Testing')
   ...: except AuthException as e:
   ...:     print(f'AuthException: {e}')
   ...: 
AuthException: 

This PR fixes this by passing in None as the first backend parameter to the AuthException.

Copy link

sonarcloud bot commented Dec 4, 2024

@john-westcott-iv john-westcott-iv changed the title AAP-36845 Fix how we build AuthExceptions AAP-37017 Fix how we build AuthExceptions Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants