mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 13:22:14 +00:00
Fitbit's handleCollectionFetchError soft-skipped a 403 but RETHREW any other hard failure, aborting every endpoint ordered after the bad one in the same resource and stalling the watermark so the whole integration stayed dead. Record hard failures on a per-cycle AsyncLocalStorage ledger and return 0 instead of rethrowing — the sibling endpoints keep fetching, and the ledger still fails the cycle so success is not stamped and the next tick refetches. Also wrap the per-metric map fan-out in the same per-collection catch so one malformed point can't skip its siblings.