diff --git a/CHANGELOG.md b/CHANGELOG.md index 70f407f8..b774b2e4 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.8 - 2017-09-12 + +* Fix problem catching errors when killing a container that doesn't exist #496 [Pablo Carranza Velez] + ## v6.2.7 - 2017-09-01 * Prefer err.message when reporting errors from dockerode, then err.json and err.reason #490 [Pablo Carranza Velez] diff --git a/package.json b/package.json index 56a0cdf3..2a6d82ff 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.7", + "version": "6.2.8", "license": "Apache-2.0", "repository": { "type": "git", diff --git a/src/application.coffee b/src/application.coffee index 338f8732..1bb4d558 100644 --- a/src/application.coffee +++ b/src/application.coffee @@ -162,8 +162,7 @@ application.kill = kill = (app, { updateDB = true, removeContainer = true } = {} .then -> container.remove(v: true) if removeContainer return - # Bluebird throws OperationalError for errors resulting in the normal execution of a promisified function. - .catch Promise.OperationalError, (err) -> + .catch (err) -> # Get the statusCode from the original cause and make sure statusCode its definitely a string for comparison # reasons. statusCode = '' + err.statusCode