mixpanelTrack expects the error property to be called error

This commit is contained in:
Pagan Gazzard 2015-04-11 15:27:57 +01:00 committed by Pablo Carranza Vélez
parent e8b6889d46
commit b6a1388c56

View File

@ -65,14 +65,14 @@ logTypes =
eventName: 'Application update'
humanName: 'Updating application'
logSystemEvent = (logType, app, err) ->
logSystemEvent = (logType, app, error) ->
message = "#{logType.humanName} '#{app.imageId}'"
if err?
if error?
# Report the message from the original cause to the user.
errMessage = err.cause?.json ? err.cause?.message ? err.message
errMessage = error.cause?.json ? error.cause?.message ? error.message
message += " due to '#{errMessage}'"
logger.log({ message, isSystem: true })
utils.mixpanelTrack(logType.eventName, {app, err})
utils.mixpanelTrack(logType.eventName, {app, error})
return
kill = (app) ->