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

CLI seems to handle network interrupt like 401 #418

Open
pfeifferj opened this issue Dec 8, 2024 · 1 comment
Open

CLI seems to handle network interrupt like 401 #418

pfeifferj opened this issue Dec 8, 2024 · 1 comment

Comments

@pfeifferj
Copy link

observed behavior:

when a network connection is interrupted, the CLI throws errors as if the user was unauthorized

❯ ibmcloud ks cluster rm -c <example>
FAILED
Log in to the IBM Cloud CLI by running 'ibmcloud login'.
❯ ibmcloud login --apikey <redacted>
API endpoint: https://cloud.ibm.com
Region: us-south
Authenticating...
Post "https://iam.cloud.ibm.com/identity/token": EOF
                
API endpoint:   https://cloud.ibm.com
Region:         us-south
Not logged in.

Warning: unable to check latest CLI version.
TIP: use 'ibmcloud config --check-version=false' to disable update check.

FAILED
Unable to authenticate.

expected behavior:

A more precise and helpful error message pointing out network connectivity has been lost would be an improvement.

@steveclay
Copy link
Collaborator

The EOF is actually communicating the interrupt. That is the error that resulted which the CLI directly reports. The CLI then continues to try to check its own version, etc. which conceals this condition. Thanks for bringing this to our attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants