Catch errors when responding from proxy error (#1465)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-11-20 13:03:22 +02:00
1 parent 5d077b0bb4
commit c92d1e614a
1 file changed
+4
+4
View File
@@ -131,7 +131,11 @@ export class LensProxy {
} }
} }
} }
try {
res.writeHead(500).end("Oops, something went wrong.") res.writeHead(500).end("Oops, something went wrong.")
} catch (e) {
logger.error(`[LENS-PROXY]: Failed to write headers: `, e)
}
}) })
return proxy; return proxy;