Skip to content

bug(cli): CLI throws an error when using coder login without an URL #11003

Closed
@phorcys420

Description

@phorcys420

When running coder login a not-so-friendly error is thrown to the user.
It would be nice if it said something like "Please provide a valid URL" or something similar, or even a prompt.

Otherwise, I also think the CLI could remember the last instance URL and prompt you asking if you want to use it again or not.


PS C:\Users\Phorcys> coder login
build info: Get "https:///api/v2/buildinfo": http: no Host in request URL
Encountered an error running "coder login"
Failed to check server "https:" for first user, is the URL correct and is coder accessible from your browser? Error - has initial user: Get "https:///api/v2/users/first": http: no Host in request URLx

Coder v2.4.0+d19a762


cc: @matifali

Metadata

Metadata

Assignees

No one assigned

    Labels

    s3Bugs that confuse, annoy, or are purely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      bug(cli): CLI throws an error when using `coder login` without an URL · Issue #11003 · coder/coder