mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-30 10:38:55 +00:00
Fix reporting errors without a "cause"
This commit is contained in:
parent
6c6f7e2af5
commit
b4306e85db
@ -69,7 +69,7 @@ logSystemEvent = (logType, app, err) ->
|
||||
message = "#{logType.humanName} '#{app.imageId}'"
|
||||
if err?
|
||||
# Report the message from the original cause to the user.
|
||||
errMessage = err.cause.json ? err.cause.message ? err.message
|
||||
errMessage = err.cause?.json ? err.cause?.message ? err.message
|
||||
message += " due to '#{errMessage}'"
|
||||
logger.log({ message, isSystem: true })
|
||||
utils.mixpanelTrack(logType.eventName, {app, err})
|
||||
|
Loading…
Reference in New Issue
Block a user