Add error logging to Marketo calls
This commit is contained in:
parent
2661db7485
commit
22f5934f34
4 changed files with 36 additions and 7 deletions
|
@ -23,6 +23,7 @@ from config import frontend_visible_config
|
|||
from external_libraries import get_external_javascript, get_external_css
|
||||
from util.names import parse_namespace_repository
|
||||
from util.secscan import PRIORITY_LEVELS
|
||||
from util.saas.useranalytics import build_error_callback
|
||||
from util.timedeltastring import convert_to_timedelta
|
||||
|
||||
|
||||
|
@ -122,8 +123,15 @@ def common_login(db_user, permanent_session=True):
|
|||
session.permanent_session_lifetime = convert_to_timedelta(session_timeout_str)
|
||||
|
||||
# Inform our user analytics that we have a new "lead"
|
||||
user_analytics.create_lead(db_user.email, db_user.username, db_user.given_name,
|
||||
db_user.family_name, db_user.company)
|
||||
create_lead_future = user_analytics.create_lead(
|
||||
db_user.email,
|
||||
db_user.username,
|
||||
db_user.given_name,
|
||||
db_user.family_name,
|
||||
db_user.company,
|
||||
)
|
||||
create_lead_future.add_done_callback(build_error_callback('Create lead failed'))
|
||||
|
||||
return True
|
||||
else:
|
||||
logger.debug('User could not be logged in, inactive?.')
|
||||
|
|
Reference in a new issue