1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Catch errors when responding on proxy error

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-11-17 13:30:36 +02:00
parent 532b10e357
commit 70b9a6ce1f

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;