Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error messages #18

Closed
neur0manc opened this issue Apr 24, 2020 · 0 comments · Fixed by #69
Closed

Improve error messages #18

neur0manc opened this issue Apr 24, 2020 · 0 comments · Fixed by #69
Assignees
Labels
enhancement New feature or request kubernetes Related to kubernetes command
Milestone

Comments

@neur0manc
Copy link

Let's improve the error messages. We should be able to give more distinct information to the user, why something might have failed. E.g.:

newKubeConfig := fetchKubeConfigFromProvider(clusterID)
if len(newKubeConfig.Clusters) == 0 || len(newKubeConfig.Users) == 0 {
	fmt.Fprintln(os.Stderr, "Error: Invalid kubeconfig")
	os.Exit(1)
}
c := newKubeConfig.Clusters[0]
u := newKubeConfig.Users[0]

As a user this is quite confusing because it looks like there's something wrong with his local ~/.kube/config, which isn't the case at all. Furthermore, there should be separate messages for both cases, since both seem to have different originating errors. Something like

  • "cluster not found"
  • "invalid user or token" (if we can tell which is the cause be even more detailed)

This should clear out some initial headache and make the first use even more impressive (because gscloud is already awesome).

@bkircher bkircher added enhancement New feature or request kubernetes Related to kubernetes command labels Jul 14, 2020
@bkircher bkircher added this to the v0.4.0 milestone Jul 14, 2020
@bkircher bkircher self-assigned this Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kubernetes Related to kubernetes command
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants