1
0
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:
Roman 2020-07-17 17:48:16 +03:00
parent 602f02741a
commit 0dbb47a398

View File

@ -42,7 +42,11 @@ export class KubeAuthProxy {
env: this.env
})
this.proxyProcess.on("exit", (code) => {
logger.error(`proxy ${this.cluster.contextName} exited with code ${code}`)
if (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) => {
logger.debug("failed to send IPC log message: " + err.message)
})
@ -73,7 +77,7 @@ export class KubeAuthProxy {
try {
const parsedError = JSON.parse(jsonError)
errorMsg = parsedError.error_description || parsedError.error || jsonError
} catch(_) {
} catch (_) {
errorMsg = jsonError.trim()
}
}