mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
The W6 swap from `isWithingsRefreshReauthFailure(message)` to the typed `classifyError(err)` + `classificationToFailureKind()` chain left two byte-identical 14-LOC catch-blocks in `sync.ts` — one in `getValidToken`, one in `syncUserMeasurements`. Extract the shared recording shape into `recordWithingsSyncFailure(userId, err)` so the two call sites collapse to a single `await`. Sync-activity / sync- sleep migration to typed errors (W6 deferred to v1.4.43) gets a single one-line catch block as a bonus when it lands. No behaviour change — the 140 withings / integrations unit tests still pin every failure path.