From 16097e79375edd1df4083a7d6314973e202005df Mon Sep 17 00:00:00 2001 From: Sergii Leshchenko Date: Thu, 10 Oct 2019 18:07:59 +0300 Subject: [PATCH] fix: fix wrapping of k8s api messages Signed-off-by: Sergii Leshchenko --- src/api/kube.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } }