You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
measurements --types accepts any string and forwards it verbatim to the Withings API. Non-numeric input bubbles up as an unhelpful HTTP-503-shaped error; unknown numeric codes silently return an empty result.
Validate --types is a comma-separated list of positive integers locally before calling the API; on bad input, error with invalid --types value "abc": expected comma-separated integers (e.g. 1,6,76).
The Withings 503 wrap is also misleading — Withings returns HTTP 200 with a non-zero status code in the body; the CLI is rendering that body status as if it were an HTTP status. Render as e.g. withings API error 503: Invalid Params without status.
Severity
minor
Summary
measurements --typesaccepts any string and forwards it verbatim to the Withings API. Non-numeric input bubbles up as an unhelpful HTTP-503-shaped error; unknown numeric codes silently return an empty result.Reproduce
Expected
--typesis a comma-separated list of positive integers locally before calling the API; on bad input, error withinvalid --types value "abc": expected comma-separated integers (e.g. 1,6,76).[], exit 0. (Right now the empty case isnull— duplicate of Empty JSON output is 'null' instead of '[]' — breaks jq pipelines #16, but worth confirming the same fix covers it.)withings API error 503: Invalid Paramswithoutstatus.