added logging for unstable functions
This commit is contained in:
parent
d280130b29
commit
19cc64d00d
|
@ -44,6 +44,7 @@ def register_post():
|
||||||
)
|
)
|
||||||
return dict(info='Confirmation mail sent.')
|
return dict(info='Confirmation mail sent.')
|
||||||
except Exception:
|
except Exception:
|
||||||
|
logger.error("Could not send confirmation mail.", exc_info=True)
|
||||||
return dict(error='Could not send confirmation mail.')
|
return dict(error='Could not send confirmation mail.')
|
||||||
|
|
||||||
|
|
||||||
|
@ -100,6 +101,7 @@ def login_twitter(user):
|
||||||
Starts the twitter OAuth authentication process.
|
Starts the twitter OAuth authentication process.
|
||||||
:return: redirect to twitter.
|
:return: redirect to twitter.
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
consumer_key = config["tapp"]["consumer_key"]
|
consumer_key = config["tapp"]["consumer_key"]
|
||||||
consumer_secret = config["tapp"]["consumer_secret"]
|
consumer_secret = config["tapp"]["consumer_secret"]
|
||||||
callback_url = request.get_header('host') + "/login/twitter/callback"
|
callback_url = request.get_header('host') + "/login/twitter/callback"
|
||||||
|
@ -112,6 +114,8 @@ def login_twitter(user):
|
||||||
return dict(error="Failed to get request token.")
|
return dict(error="Failed to get request token.")
|
||||||
user.save_request_token(auth.request_token)
|
user.save_request_token(auth.request_token)
|
||||||
return bottle.redirect(redirect_url)
|
return bottle.redirect(redirect_url)
|
||||||
|
except Exception:
|
||||||
|
logger.error("Error with Sign in with Twitter.", exc_info= True)
|
||||||
|
|
||||||
|
|
||||||
@get('/login/twitter/callback')
|
@get('/login/twitter/callback')
|
||||||
|
|
Loading…
Reference in a new issue