From 76fabd64be0103019be1ed48d70a62b4295fc00a Mon Sep 17 00:00:00 2001 From: Jon Edvald Date: Wed, 25 Apr 2018 14:23:50 +0200 Subject: [PATCH] fix: better kubectl errors --- src/plugins/kubernetes/actions.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/kubernetes/actions.ts b/src/plugins/kubernetes/actions.ts index 518c399b4f..02dfe1f546 100644 --- a/src/plugins/kubernetes/actions.ts +++ b/src/plugins/kubernetes/actions.ts @@ -55,7 +55,14 @@ export async function getEnvironmentStatus({ ctx, provider }: GetEnvironmentStat } catch (err) { // TODO: catch error properly if (err.output) { - throw new DeploymentError(err.output, { output: err.output }) + throw new DeploymentError( + `Unable to connect to Kubernetes cluster. ` + + `Please make sure it is running, reachable and that you have the right context configured.`, + { + context, + kubectlOutput: err.output, + }, + ) } throw err }