RADAR-base / RADAR-REST-Connector

A Kafka Source connector to receive data from REST APIs and publish them to Kafka. It has an extended version to support FitBit APIs.
https://radar-base.org/
Apache License 2.0
4 stars 4 forks source link

Update routes to limit range to 30 days #118

Closed mpgxvii closed 7 months ago

mpgxvii commented 7 months ago
yatharthranjan commented 7 months ago

From what i can see, seems like we don't request for more than 30 days in a single request anyways?

mpgxvii commented 7 months ago

From what i can see, seems like we don't request for more than 30 days in a single request anyways?

Oh I was thinking if the start date was > than 30 days before today, it would be the case? One of the users reported these logs:

WARN Failed to make request FitbitRestRequest{url=https://api.fitbit.com/1/user/[]/hrv/date/2023-04-19/2024-03-05/all.json, user=LocalUser{id='[]', version='2023-04-20T14:00:27.807529715Z
yatharthranjan commented 7 months ago

oh ok, could be the case. But we also see these same logs in our connector (which is not collecting any of these endpoints), so not sure what causes it. Maybe we need better reporting of failed requests in the logs (like the code, message, etc returned from failed HTTP request to determine the root cause).

This is a worthy feature update regardless, so i would proceed to merge.