diff --git a/CHANGELOG.md b/CHANGELOG.md index bac753cd..70f407f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to [Semantic Versioning](http://semver.org/). +## v6.2.7 - 2017-09-01 + +* Prefer err.message when reporting errors from dockerode, then err.json and err.reason #490 [Pablo Carranza Velez] + ## v6.2.6 - 2017-08-29 * Add a sync.js script to allow syncing a running supervisor container on a local device #494 [Pablo Carranza Velez] diff --git a/package.json b/package.json index ff2c5c15..56a0cdf3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "resin-supervisor", "description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.", - "version": "6.2.6", + "version": "6.2.7", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/src/application.coffee b/src/application.coffee index de652be9..338f8732 100644 --- a/src/application.coffee +++ b/src/application.coffee @@ -130,11 +130,11 @@ logSystemEvent = (logType, app = {}, error) -> message = "#{logType.humanName} '#{app.imageId}'" if error? # Report the message from the original cause to the user. - errMessage = error.json + errMessage = error.message + if _.isEmpty(errMessage) + errMessage = error.json if _.isEmpty(errMessage) errMessage = error.reason - if _.isEmpty(errMessage) - errMessage = error.message if _.isEmpty(errMessage) errMessage = 'Unknown cause' message += " due to '#{errMessage}'"