mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
Polar and Oura response classifiers were byte-identical copies of the status-driven verdict, the typed API error, and the invalid_grant probe. Extract classifyHttpStatus, an IntegrationApiError base carrying the vendor label, and a vendor-scoped isOAuthInvalidGrant into a shared module; Polar and Oura now re-export under their existing names and types so call sites and instanceof checks are unchanged. Collapse the triplicated classifyXFailure mapping (Polar, Oura, Nightscout) onto one toFailureKind helper. Behaviour is identical: same classifications, same failure kinds, same error types.