Skip to content

Commit

Permalink
fix: better kubectl errors
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Apr 25, 2018
1 parent 3c78c36 commit 76fabd6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/plugins/kubernetes/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 76fabd6

Please sign in to comment.