mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add logging on proxy error (#3303)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f7ad554108
commit
17a8044647
@ -177,6 +177,8 @@ export class LensProxy extends Singleton {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.error(`[LENS-PROXY]: http proxy errored for cluster: ${error}`, { url: req.url });
|
||||
|
||||
if (target) {
|
||||
logger.debug(`Failed proxy to target: ${JSON.stringify(target, null, 2)}`);
|
||||
|
||||
@ -196,7 +198,7 @@ export class LensProxy extends Singleton {
|
||||
}
|
||||
|
||||
try {
|
||||
res.writeHead(500).end("Oops, something went wrong.");
|
||||
res.writeHead(500).end(`Oops, something went wrong.\n${error}`);
|
||||
} catch (e) {
|
||||
logger.error(`[LENS-PROXY]: Failed to write headers: `, e);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user