mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 22:47:49 +00:00
Improve error messages reported to the user in the case of finding an empty string.
This commit is contained in:
parent
e38796e92a
commit
a959660f90
@ -1,2 +1,3 @@
|
|||||||
|
* Improved error messages reported to the user in the case of finding an empty string.
|
||||||
* Switched to using the dockerode pull progress mechanism.
|
* Switched to using the dockerode pull progress mechanism.
|
||||||
* Fixed trying to delete supervisor container when it reports an alternate tag instead of the primary tag.
|
* Fixed trying to delete supervisor container when it reports an alternate tag instead of the primary tag.
|
||||||
|
@ -69,7 +69,15 @@ logSystemEvent = (logType, app, error) ->
|
|||||||
message = "#{logType.humanName} '#{app.imageId}'"
|
message = "#{logType.humanName} '#{app.imageId}'"
|
||||||
if error?
|
if error?
|
||||||
# Report the message from the original cause to the user.
|
# Report the message from the original cause to the user.
|
||||||
errMessage = error.cause?.json ? error.cause?.message ? error.message
|
errMessage = error.cause?.json
|
||||||
|
if _.isEmpty(errMessage)
|
||||||
|
errMessage = error.cause?.reason
|
||||||
|
if _.isEmpty(errMessage)
|
||||||
|
errMessage = error.cause?.message
|
||||||
|
if _.isEmpty(errMessage)
|
||||||
|
errMessage = error.message
|
||||||
|
if _.isEmpty(errMessage)
|
||||||
|
errMessage = 'Unknown cause'
|
||||||
message += " due to '#{errMessage}'"
|
message += " due to '#{errMessage}'"
|
||||||
logger.log({ message, isSystem: true })
|
logger.log({ message, isSystem: true })
|
||||||
utils.mixpanelTrack(logType.eventName, {app, error})
|
utils.mixpanelTrack(logType.eventName, {app, error})
|
||||||
|
Loading…
Reference in New Issue
Block a user