Skip to content

fix: fix workspacesdk to return error on API mismatch #13683

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 1 commit into from
Jun 27, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Jun 27, 2024

fixes #13478

If the CLI is ahead of the server version, across a tailnet API change, you'll see something like:

% coder ping dogfood2
Encountered an error running "coder ping", see "coder ping --help" for more information
error: Trace=[start connector: ]
Unknown or unsupported API version
1 validation error(s) found
	 version : server is at version 2.0, behind requested minor version 2.1
Suggestion: Ensure your client release version (v2.12.1, different than the API version) matches the server release version
exit status 1

This is still a bit cryptic, tbh, but Websocket only returns 1024 bytes of body when it fails, so if we want to do better we'll need to do our wordsmithing client side.

Edit: I decided to go ahead and add a suggestion client side, see above for what it looks like.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @spikecurtis and the rest of your teammates on Graphite Graphite

@spikecurtis spikecurtis marked this pull request as ready for review June 27, 2024 09:48
@spikecurtis spikecurtis force-pushed the spike/13478-tailnet-api-error branch from de5e515 to 25c6591 Compare June 27, 2024 10:27
@spikecurtis spikecurtis force-pushed the spike/13478-tailnet-api-error branch from 25c6591 to a4c038d Compare June 27, 2024 10:54
@spikecurtis spikecurtis merged commit 5b59f28 into main Jun 27, 2024
27 of 28 checks passed
Copy link
Contributor Author

Merge activity

@spikecurtis spikecurtis deleted the spike/13478-tailnet-api-error branch June 27, 2024 11:02
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2024
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.

Coder CLI needs a clearer error when it connects to an incompatible server
2 participants