Auto-merge for PR #496 via VersionBot

Fix problem catching errors when killing a container that doesn't exist
This commit is contained in:
resin-io-versionbot[bot] 2017-09-12 02:17:10 +00:00 committed by GitHub
commit bf83fc3ec1
3 changed files with 6 additions and 3 deletions

View File

@ -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]

View File

@ -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",

View File

@ -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