goenning / google-indexing-script

Script to get your site indexed on Google in less than 48 hours
https://seogets.com
MIT License
6.96k stars 483 forks source link

Add rate limit error handling #29

Closed AntoineKM closed 8 months ago

AntoineKM commented 8 months ago

What did I change? I've added a custom error message and a process stop when a 429 error occurs.

Why did I change it? To partially fix #8, but as we discussed (https://github.com/goenning/google-indexing-script/issues/8#issuecomment-1961838102), we'll also need to add a progress backup in a future pull request.

goenning commented 8 months ago

There's already some sort of built-in progress backup using the .cache folder.

If there's a 429 before the .cache is saved, we save the url with status "Error" (or maybe "RateLimited"?), but we don't exit the script.

After the .cache is saved, when we're doing the indexing process, if there's a 429 we notify the user and exit cleanly instead of treating it as an error.

What you think?

AntoineKM commented 8 months ago

Yes it can be good I'll try to do it like that

AntoineKM commented 8 months ago

@goenning it might be better now what do you think ?

AntoineKM commented 8 months ago

https://github.com/goenning/google-indexing-script/assets/54948363/6268b448-de02-4b6f-94da-3c974295cb69

goenning commented 8 months ago

Looks great, thank you! :)