Closed 75lb closed 8 years ago
another example
InternalServerError: [PROXY] getaddrinfo ENOTFOUND lhtapp01 lhtapp01:8180: http://lhtapp01:8180/resources/contents/copies/113879/draft
at Object.throw (/Users/lloydb/Documents/75lb/local-web-server/node_modules/koa/lib/context.js:91:23)
at ProxyServer.proxy.once.err (/Users/lloydb/Documents/75lb/local-web-server/lib/middleware.js:40:17)
at ProxyServer.emit (/Users/lloydb/Documents/75lb/local-web-server/node_modules/eventemitter3/index.js:144:27)
at ClientRequest.proxyError (/Users/lloydb/Documents/75lb/local-web-server/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:141:16)
at emitOne (events.js:101:20)
at ClientRequest.emit (events.js:188:7)
at Socket.socketErrorListener (_http_client.js:306:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at connectErrorNT (net.js:1015:8)
Adding a third example:
InternalServerError: [PROXY] connect ECONNREFUSED 127.0.0.1:8080: http://localhost:8080/...
at Object.throw (/usr/local/lib/node_modules/local-web-server/node_modules/koa/lib/context.js:91:23)
at ProxyServer.<anonymous> (/usr/local/lib/node_modules/local-web-server/lib/middleware.js:48:17)
at ProxyServer.emit (/usr/local/lib/node_modules/local-web-server/node_modules/eventemitter3/index.js:144:27)
at ClientRequest.proxyError (/usr/local/lib/node_modules/local-web-server/node_modules/http-proxy/lib/http-proxy/passes/web-incoming.js:141:16)
at emitOne (events.js:82:20)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:258:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1256:8)
ws started with:
ws -p 8082 -r '/api/*->http://localhost:8080/$1' -d app
and the proxied app was not running or had crashed.
fixed and released in v1.2.5, thanks for the patience.
Perfect :-)
if a remote proxy request fails for some reason (e.g. socket hang-up),
ws
crashes.. it should handle the exception, report the issue and carry on.