- Notifications
You must be signed in to change notification settings - Fork1k
fix(cli): enhance error handling for multiple agents in SSH command#19943
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I have one recommendation, but otherwise lgtm & I don't need to review again
ws,agent,_,err:=GetWorkspaceAndAgent(ctx,inv,client,!disableAutostart,hostname) | ||
ws,agent,otherAgents,err:=GetWorkspaceAndAgent(ctx,inv,client,!disableAutostart,hostname) | ||
iferr!=nil&&strings.Contains(err.Error(),"multiple agents found") { |
ethanndicksonSep 25, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can we define the 'multiple agents found' error as a sentinel, and then useerrors.Is
instead?
c8742ba
intomainUh oh!
There was an error while loading.Please reload this page.
Closes#19812
Problem
This PR enhances the error handling to provide suggestions with SSH commands that users can copy and paste directly.
Before:
After: