Catch errors when responding on proxy error

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala committed 2020-11-17 13:30:36 +02:00
1 parent 532b10e357
commit 70b9a6ce1f
1 file changed
+5 -1
+5 -1
View File
@@ -131,7 +131,11 @@ export class LensProxy {
} }
} }
} }
res.writeHead(500).end("Oops, something went wrong.") try {
res.writeHead(500).end("Oops, something went wrong.")
} catch (e) {
// Can't send headers. Probably app is closing.
}
}) })
return proxy; return proxy;