diff --git a/src/api/kube.ts b/src/api/kube.ts index 33a41a23f..bff7fe02e 100644 --- a/src/api/kube.ts +++ b/src/api/kube.ts @@ -1055,7 +1055,7 @@ export class KubeHelper { * @param e k8s error to wrap */ private wrapK8sClientError(e: any): Error { - if (e.body && e.body.message) return new Error(e.body.message) + if (e.response && e.response.body && e.response.body.message) return new Error(e.response.body.message) else return new Error(e) } }