mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Better log line when quitting Lens, close #480
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
602f02741a
commit
0dbb47a398
@ -42,7 +42,11 @@ export class KubeAuthProxy {
|
|||||||
env: this.env
|
env: this.env
|
||||||
})
|
})
|
||||||
this.proxyProcess.on("exit", (code) => {
|
this.proxyProcess.on("exit", (code) => {
|
||||||
|
if (code) {
|
||||||
logger.error(`proxy ${this.cluster.contextName} exited with code ${code}`)
|
logger.error(`proxy ${this.cluster.contextName} exited with code ${code}`)
|
||||||
|
} else {
|
||||||
|
logger.info(`proxy ${this.cluster.contextName} exited successfully`)
|
||||||
|
}
|
||||||
this.sendIpcLogMessage(`proxy exited with code ${code}`, "stderr").catch((err: Error) => {
|
this.sendIpcLogMessage(`proxy exited with code ${code}`, "stderr").catch((err: Error) => {
|
||||||
logger.debug("failed to send IPC log message: " + err.message)
|
logger.debug("failed to send IPC log message: " + err.message)
|
||||||
})
|
})
|
||||||
@ -73,7 +77,7 @@ export class KubeAuthProxy {
|
|||||||
try {
|
try {
|
||||||
const parsedError = JSON.parse(jsonError)
|
const parsedError = JSON.parse(jsonError)
|
||||||
errorMsg = parsedError.error_description || parsedError.error || jsonError
|
errorMsg = parsedError.error_description || parsedError.error || jsonError
|
||||||
} catch(_) {
|
} catch (_) {
|
||||||
errorMsg = jsonError.trim()
|
errorMsg = jsonError.trim()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user