Skip to content

Surface API errors during CLI version checks - #26

Merged
csandanov merged 1 commit into
masterfrom
fix/api-version-http-errors
Aug 23, 2026
Merged

Surface API errors during CLI version checks#26
csandanov merged 1 commit into
masterfrom
fix/api-version-http-errors

Conversation

@csandanov

Copy link
Copy Markdown
Member

Summary

  • check HTTP status before parsing the minimum CLI version
  • surface API authorization messages and HTTP fallback errors instead of misleading semver failures
  • close version response bodies and trim successful version text
  • add regression tests for success, 401 JSON, non-JSON upstream failure, empty responses, and body closure

Validation

  • go test ./...
  • end-to-end call to api.dev.wodby.com with a placeholder invalid token now reports Unknown authorization token
  • git diff --check

Operational note

The failed staging workflow reached the dev API correctly but received HTTP 401. Its WODBY_API_KEY still needs to be replaced with a valid Wodby 1 dev API key.

Route plain-text version responses through shared HTTP status handling so authorization and upstream errors are reported before semver parsing. Close response bodies, normalize valid version text, and cover success and failure cases.
@csandanov
csandanov merged commit 15c0b47 into master Aug 23, 2026
9 checks passed
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

Successfully merging this pull request may close these issues.

1 participant