bassarisse / google-spreadsheet-to-json

Simple tool to export Google Spreadsheets to JSON files, though Node API or CLI
The Unlicense
134 stars 33 forks source link

429 Error too many requests #22

Open sammorrisdesign-zz opened 6 years ago

sammorrisdesign-zz commented 6 years ago

I've been having a little bit of an issue with this package. I've managed to figure out why it's happening. I think.

I'm trying to request too many worksheets at once (from what I can see). It might be worth throttling the number of requests made somehow. I've just put in a random delay to solve it for me but there's a probably a better way of doing it.

bassarisse commented 6 years ago

Sorry for the delay, and thank you for your time in reporting this.

I never experienced this error, but I'm not sure if it's something the package should (and could) handle.

Can you provide more details about your case, so we can investigate it further? Things like:

sammorrisdesign-zz commented 6 years ago

I'm using a Google Service Account to authenticate. My Doc has 65 spreadsheets in it! Which I know is a lot and definitely not common, but it made sense for my project.

Here's the code. I actually ended up just passing in a list of sheets before any requests as the names are predictable in this case. I then fetched them one by one and waited for a response before continuing. It gets the job done, but it massively slows fetching down.

I'd understand if this is something you wouldn't want the package to support. It could easily be considered a weird edge case.