pass the proper error message

This commit is contained in:
Eugene Mirotin 2014-09-18 11:24:22 +01:00 committed by Pablo Carranza Vélez
parent 3810a394c9
commit 378913862f

View File

@ -36,7 +36,7 @@ api.post '/v1/spawn-tty', (req, res) ->
.then (url) ->
res.send(200, url)
.catch (err) ->
res.send(404, err)
res.send(503, err?.message or err or 'Unknown error')
api.post '/v1/despawn-tty', (req, res) ->
appId = req.body.appId