mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: KubeStatus message/status/info full explanation
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
b5187ba75f
commit
1272039e52
@ -58,9 +58,9 @@ export class PodApi extends KubeApi<Pod> {
|
||||
const status = new KubeStatus(response);
|
||||
|
||||
if (status.code >= 200 && status.code < 300) {
|
||||
return status.getMessage();
|
||||
return status.getExplanation();
|
||||
} else {
|
||||
throw status.getMessage();
|
||||
throw status.getExplanation();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -297,10 +297,10 @@ export class KubeStatus {
|
||||
this.status = data.status || "";
|
||||
}
|
||||
|
||||
getMessage() {
|
||||
getExplanation(): string {
|
||||
const { code, message, reason, status } = this;
|
||||
|
||||
return `${code}: ${message ?? reason ?? status}`;
|
||||
return `${code}: ${message || reason || status}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user