Skip to content

Commit

Permalink
Improve display for ECONNREFUSED errors
Browse files Browse the repository at this point in the history
  • Loading branch information
clochix authored and paultranvan committed Apr 4, 2016
1 parent 73e642d commit baa4643
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/lib/proxy.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ module.exports.initializeProxy = (app, server) ->

# proxy error handling
proxy.on 'error', (err, req, res) ->
console.log err
if /ECONNREFUSED/.test err
console.log "connexion to #{req.url} refused"
else
console.log err

err = new Error err
err.statusCode = 500
Expand Down

0 comments on commit baa4643

Please sign in to comment.