Summary
hevycli routine list fails entirely for accounts that organise routines into folders:
Error: failed to fetch routines: NETWORK_ERROR: failed to fetch routines: json: cannot unmarshal number into Go struct field Routine.routines.folder_id of type string
Cause
The Hevy API returns folder_id as a number for routines inside a folder (and null otherwise), while the Routine struct types it as string. Accounts with no folders are unaffected, which likely hid this in testing.
Repro
- In the Hevy app, put any routine inside a routine folder.
hevycli routine list → unmarshal error, no output.
Verified on v0.3.0 (Homebrew cask, macOS arm64). Possibly related to #6 (response-shape mismatches) — a json.Number/custom unmarshaller or *int64 field would fix it.
Thanks again!
Summary
hevycli routine listfails entirely for accounts that organise routines into folders:Cause
The Hevy API returns
folder_idas a number for routines inside a folder (andnullotherwise), while theRoutinestruct types it asstring. Accounts with no folders are unaffected, which likely hid this in testing.Repro
hevycli routine list→ unmarshal error, no output.Verified on v0.3.0 (Homebrew cask, macOS arm64). Possibly related to #6 (response-shape mismatches) — a
json.Number/custom unmarshaller or*int64field would fix it.Thanks again!