- Notifications
You must be signed in to change notification settings - Fork929
feat(cli): add error message for bad login URL#4042
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -83,7 +83,7 @@ func login() *cobra.Command { | ||
hasInitialUser, err := client.HasFirstUser(cmd.Context()) | ||
if err != nil { | ||
return xerrors.Errorf("Failed to check server %q for first user, is the URL correct and is coder accessible from your browser? Error -has initial user: %w", serverURL.String(), err) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Thought about this a bit more last night...Since this is user-facing, I think the friendly error message should be included in the test assertion. Otherwise, it can be removed and the test would still pass. Then we'd have a working CLI with poor UX. Instead, we want to ensure we have good UX. | ||
} | ||
if !hasInitialUser { | ||
_, _ = fmt.Fprintf(cmd.OutOrStdout(), caret+"Your Coder deployment hasn't been set up!\n") | ||