Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to handle 504 - Gateway Timeout - FitBit Error?

Hi, i'm having this error:

Unhandled rejection StatusCodeError: 504 - "Gateway Timeout".

Seems to happen with this path: 

 

https://api.fitbit.com/1/user/-/activities/activityCalories/data/today/1y.json

 

Is there a solution?

Best Answer
0 Votes
3 REPLIES 3

Hi @RaulAlvarez 

 

Typically with timeout errors, you should wait a few minutes and try again.   Have you tried executing the endpoint again to see if the data is returned?

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit

I tried several times, I having this error for some weeks.

Best Answer
0 Votes

Hi @RaulAlvarez 

 

I've been able to research this problem and determined that the resource "activityCalories" only supports a period length of 1 month.  We have an open ticket to provide a better error message than the "504 Timeout" or "TypeError: Origin https://dev.fitbit.com is not allowed by Access-Control-Allow-Origin".  

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes