Skip to content

fix: enrich the notLoggedInMessage error message with the full path to the coder #17715

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

Merged
merged 4 commits into from
May 12, 2025

Conversation

cstyan
Copy link
Contributor

@cstyan cstyan commented May 7, 2025

Opening as a draft for now since I'm not really sure this actually provides any value. We set out to resolve #11505 but for this specific login error, if you are not logged in but any of the CLI arg, env var, or config file values are set for the URL you should instead get the SignedOutErrorMessage related to there not being a login token rather than this notLoggedInMessage.

So at the moment, it really seems like all we can do is change coder to os.Executable() which would give the full path to the coder executable just in case it's not already somewhere that is in the users path.

Copy link

github-actions bot commented May 7, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@cstyan
Copy link
Contributor Author

cstyan commented May 8, 2025

I have read the CLA Document and I hereby sign the CLA

cdrci2 added a commit to coder/cla that referenced this pull request May 8, 2025
@cstyan cstyan changed the title enrich the notLoggedInMessage error message with the full path to the coder fix: enrich the notLoggedInMessage error message with the full path to the coder May 8, 2025
@cstyan cstyan marked this pull request as ready for review May 8, 2025 21:23
cstyan added 3 commits May 8, 2025 22:46
executable

Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
goroutine

Signed-off-by: Callum Styan <callumstyan@gmail.com>
@cstyan cstyan force-pushed the callum-login-error-enrichment branch from fba1720 to 364c8bf Compare May 8, 2025 22:46
Signed-off-by: Callum Styan <callumstyan@gmail.com>
@cstyan cstyan requested review from mafredri and f0ssel May 9, 2025 22:06
@cstyan cstyan merged commit 578b9ff into main May 12, 2025
34 checks passed
@cstyan cstyan deleted the callum-login-error-enrichment branch May 12, 2025 18:45
@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display environment context in error messages like Try logging in using 'coder login <url>'
2 participants