jsonMartin / readwise-mirror

MIT License
52 stars 11 forks source link

feat: :alien: implement readwise throttling #21

Closed johannrichard closed 1 year ago

johannrichard commented 1 year ago

Due to cross-origin / request limitations, access to the "Retry-After" header is limited and when Readwise returns status 429, the plugin tries to throttle with a NaN. However, the Readwise API returns the throttling info in the body. This change implements the necessary parsing and catch, with the default 20 req./min throttling in case parsing wouldn't work.

(Now working with the correct changes.)

johannrichard commented 1 year ago

See the following article for an explainer of what I presume is the source of the original problem

jsonMartin commented 1 year ago

Hey @johannrichard , I just saw your open pull requests - I can't get to them just yet, but will review them when I have some spare time.

Thank you for your hard work on these PRs!

jsonMartin commented 1 year ago

LGTM 👍🏼