We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 363cdd0 commit a288351Copy full SHA for a288351
src/node/http.ts
@@ -490,7 +490,10 @@ export class HttpServer {
490
} else {
491
this.server = http.createServer(this.onRequest)
492
}
493
- this.proxy.on("error", (error) => logger.warn(error.message))
+ this.proxy.on("error", (error, _request, response) => {
494
+ response.writeHead(HttpCode.ServerError)
495
+ response.end(error.message)
496
+ })
497
// Intercept the response to rewrite absolute redirects against the base path.
498
this.proxy.on("proxyRes", (response, request: ProxyRequest) => {
499
if (response.headers.location && response.headers.location.startsWith("/") && request.base) {
0 commit comments