Catch errors when responding from proxy error (#1416)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala authored and GitHub committed 2020-11-18 12:33:53 +02:00
1 parent 126e1ff7a8
commit 3197e3a1fe
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) {
logger.error(`[LENS-PROXY]: Failed to write headers: `, e)
}
})
return proxy;