Skip to content
This repository has been archived by the owner on Nov 3, 2019. It is now read-only.

Commit

Permalink
Fix: Show more details why authenticating with Habitica failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
passuf committed Jan 27, 2016
1 parent ae40d2f commit 99970e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wh_habitica/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_user_details(self):
try:
user_details[default.JSON_ID] = user[default.JSON_ID]
except Exception:
logger.exception('Could not find Habitica user id')
logger.exception('Could not find Habitica user id: ' + str(user))

# Parse user details
if default.JSON_LOCAL in auth_details and auth_details[default.JSON_LOCAL]:
Expand All @@ -63,7 +63,7 @@ def get_user_details(self):
user_details[default.JSON_EMAIL] = auth_local[default.JSON_EMAIL]
user_details[default.JSON_NAME] = auth_local[default.JSON_USERNAME]
except Exception:
logger.exception('Could not parse Habitica user with local auth.')
logger.exception('Could not parse Habitica user with local auth: ' + str(user))

elif default.JSON_FACEBOOK in auth_details:
# User is authenticated with facebook
Expand All @@ -72,11 +72,11 @@ def get_user_details(self):
user_details[default.JSON_EMAIL] = auth_facebook[default.JSON_EMAIL]
user_details[default.JSON_NAME] = auth_facebook[default.JSON_NAME]
except Exception:
logger.exception('Could not parse Habitica user with Facebook auth.')
logger.exception('Could not parse Habitica user with Facebook auth: ' + str(user))

else:
# No valid authentication provider found
logger.error('No valid Habitica auth provider found.')
logger.error('No valid Habitica auth provider found: ' + str(user))

return user_details

Expand Down

0 comments on commit 99970e4

Please sign in to comment.