mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-13 14:32:03 +00:00
A 403 on a single WHOOP collection endpoint was classified reauth_required, which parked the whole connection at error_reauth and short-circuited every future sync. A lower-tier user missing one gated data class would brick the entire integration. Treat a per-resource collection 403 as a soft skip of that data class: log, return 0, and continue so sibling resources still sync. Reserve connection-wide reauth for a 401 (token rejected) and for a 403 on the token-refresh / profile path, which run outside the per-resource catch blocks and remain unchanged. Add isCollectionForbidden as the shared gate and cover both branches in tests.