Add error logging to Marketo calls
This commit is contained in:
parent
2661db7485
commit
22f5934f34
4 changed files with 36 additions and 7 deletions
|
@ -14,6 +14,16 @@ class LeadNotFoundException(Exception):
|
|||
pass
|
||||
|
||||
|
||||
def build_error_callback(message_when_exception):
|
||||
def maybe_log_error(response_future):
|
||||
try:
|
||||
response_future.result()
|
||||
except Exception:
|
||||
logger.exception('User analytics: %s', message_when_exception)
|
||||
|
||||
return maybe_log_error
|
||||
|
||||
|
||||
class _MarketoAnalyticsClient(object):
|
||||
""" User analytics implementation which will report user changes to the
|
||||
Marketo API.
|
||||
|
|
Reference in a new issue