Skip to content

fix: add scheme support, centralize BaseURL, fix response body leak#8

Draft
LaurenDebruyn wants to merge 1 commit intomainfrom
fix/api-client-improvements
Draft

fix: add scheme support, centralize BaseURL, fix response body leak#8
LaurenDebruyn wants to merge 1 commit intomainfrom
fix/api-client-improvements

Conversation

@LaurenDebruyn
Copy link
Copy Markdown

Summary

  • Add --scheme flag to auth login for HTTP connections (e.g. local dev)
  • Centralize host+scheme defaulting in Profile.BaseURL() — used by API client, auth status, and login confirmation
  • Fix HTTP response body leak in UpdateMetricMonitoring by properly decoding the POST response
  • Remove redundant UpdateMetricMonitoringRequest struct, use MetricMonitoringSettings directly

Test plan

  • sodacli auth login --scheme http --host localhost:8080 --api-key-id x --api-key-secret y connects over HTTP
  • sodacli auth status displays full URL including scheme when non-default
  • sodacli monitor config <dataset-id> --enable still works (uses updated MetricMonitoringSettings type)
  • Verify non-2xx responses from dataset update POST are now surfaced as errors

🤖 Generated with Claude Code

Add --scheme flag to auth login so users can connect over HTTP for local
dev. Centralize host+scheme defaulting in Profile.BaseURL() and use it
everywhere (API client, auth status, login confirmation). Fix response
body leak in UpdateMetricMonitoring by decoding the POST response.
Remove redundant UpdateMetricMonitoringRequest struct in favor of
MetricMonitoringSettings.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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