Have dev proxy return 502 when proxy fails, rather than calling next

This commit is contained in:
Scott Erickson 2016-04-08 09:35:10 -07:00
parent ece3c6f19d
commit c20ed58f9f

View file

@ -249,4 +249,4 @@ setupProxyMiddleware = (app) ->
req.proxied = true
proxy.web req, res, (e) ->
console.warn("Failed to proxy: ", e)
next()
res.status(502).send({message: 'Proxy failed'})