docs: align historical plans/specs with renamed identifiers (roundTrip -> execute, log schema)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -42,7 +42,7 @@ dispatcher that `get_workout_by_id` goes through) gains a check: if the caught e
|
||||
|
||||
- `wireResponse` gains `NotFound bool `json:"not_found,omitempty"``.
|
||||
- A new sentinel: `var ErrNotFound = errors.New("garmin: resource not found")`.
|
||||
- `roundTrip`: when `resp.Error != "" && resp.NotFound`, the returned error wraps `ErrNotFound`
|
||||
- `execute`: when `resp.Error != "" && resp.NotFound`, the returned error wraps `ErrNotFound`
|
||||
(`fmt.Errorf("%s: %s: %w", cmdName, resp.Error, ErrNotFound)`), so callers can
|
||||
`errors.Is(err, garmin.ErrNotFound)` regardless of which method was called.
|
||||
|
||||
@@ -96,7 +96,7 @@ no shape change -- a test simulating a 404 just sets the mapped error to
|
||||
- `internal/garmin/pyscript/tests/test_wrapper.py`: a new test mirroring the existing
|
||||
`test_call_propagates_garminconnect_exception_as_error`, but raising
|
||||
`GarminConnectNotFoundError` and asserting the response includes `"not_found": true`.
|
||||
- `internal/garmin` (Go): a test asserting `roundTrip` wraps the error with `ErrNotFound` when
|
||||
- `internal/garmin` (Go): a test asserting `execute` wraps the error with `ErrNotFound` when
|
||||
the wire response sets `not_found: true`.
|
||||
- `internal/store`: extend the existing `ActivitiesMissingWorkout` test (or add a new one) with a
|
||||
fixture that has `workout_not_found_at` set, asserting it's excluded from both
|
||||
|
||||
Reference in New Issue
Block a user