You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When receiving error 429 when fetching Parquet data, we could:
read the Retry-After header if present, otherwise use a default retry delay
wait for this delay then retry
show a temporary error message (toast?). If we identify that the source is Hugging Face (only in https://github.com/hyparam/space for now), we could propose to login if it's not already the case, because passing a token raises the rate limiting threshold.
Note that hyperparam fetches the data from a web worker. We pass from to the worker through a message, but it's not possible to pass a function. So: the custom fetch function (like https://www.npmjs.com/package/fetch-retry) should be defined in the worker. Possibly some parameters (default retry delay, etc) could be passed in the message if needed
As an alternative, the worker could send details about the error (429 + retry-after if any), and let the client control the flow of fetches.
In my test, it created 2,184 requests, and about 150 of them are CORS errors, i.e., no response, no 429 code, and no Retry-After header. Not easy to handle.
Activity
severo commentedon May 22, 2025
Note that hyperparam fetches the data from a web worker. We pass
fromto the worker through a message, but it's not possible to pass a function. So: the custom fetch function (like https://www.npmjs.com/package/fetch-retry) should be defined in the worker. Possibly some parameters (default retry delay, etc) could be passed in the message if neededAs an alternative, the worker could send details about the error (429 + retry-after if any), and let the client control the flow of fetches.
In either ways, it's not trivial.
severo commentedon May 22, 2025
Also, I reproduced the issue:
npm run devlanguagecolumnIn my test, it created 2,184 requests, and about 150 of them are CORS errors, i.e., no response, no 429 code, and no Retry-After header. Not easy to handle.