Skip to content

fix: accept exhausted WHOOP collection pages - #12

Merged
Aarekaz merged 1 commit into
masterfrom
fix/whoop-collection-backfill
Aug 21, 2026
Merged

fix: accept exhausted WHOOP collection pages#12
Aarekaz merged 1 commit into
masterfrom
fix/whoop-collection-backfill

Conversation

@Aarekaz

@Aarekaz Aarekaz commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Root cause

WHOOP's live v2 collection API returns a null next-token value when a page is exhausted, while its published OpenAPI describes the field as absent. The strict parser rejected all cycle, recovery, sleep, and workout pages before persistence.

Fix

  • accept null or absent provider next tokens
  • normalize both to internal undefined
  • retain opaque string tokens unchanged for real continuation pages

Verification

  • production-safe diagnostics reproduced next-token invalid-type errors for all four collections
  • RED regression rejected a null next token
  • GREEN focused 67/67, full API 286/286, typecheck, diff check

@Aarekaz
Aarekaz merged commit e3c5d10 into master Aug 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant