Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update failed: HTTPError: Response code 429 (Too Many Requests) #33

Closed
bcouetil opened this issue Aug 15, 2023 · 6 comments
Closed

Update failed: HTTPError: Response code 429 (Too Many Requests) #33

bcouetil opened this issue Aug 15, 2023 · 6 comments

Comments

@bcouetil
Copy link

Hello, many thanks for this wonderful tool 🥰

I have this error when I push multiple (at least 5) articles at once :

Update failed: HTTPError: Response code 429 (Too Many Requests)

So when I update a minor thing in every articles, I fall back to this :

for file in *.md; do sleep 2 && dev push $file; done

Would it be possible to limit requests to dev.to ?

@jikuja
Copy link

jikuja commented Oct 21, 2023

Did you try dev push *.md instead of calling dev push multiple times?

@bcouetil
Copy link
Author

Thank you for your time 😊

When I say "at once", I mean what you suggested. The loop is a workaround.

@jikuja
Copy link

jikuja commented Oct 21, 2023

Looks like I cannot read and/or understand.

I could not reproduce it with three updates. As soon as I have more articles to update I'll return to this unless it has been already fixed before that. Looks like three updates was not high enough to trigger throttling.

The code already has support for throttling:

https://github.com/sinedied/devto-cli/blob/main/src/api.ts#L11-L14 & https://github.com/sinedied/devto-cli/blob/main/src/api.ts#L76C55-L76C55 but it is turned on only for new article creation. It should be fairly easy to add similar throttling for updates but sane values are needed for that.

@bcouetil
Copy link
Author

Great, thank you for the analysis, it makes sense : I have mostly existing articles, 10 of them in the same folder 👍

My workaround is satisfying for now.

@sinedied
Copy link
Owner

Fixed by #36

@bcouetil
Copy link
Author

You rock man, thanks 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants