Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Handle http status code 429 #25

Open
krzysiek-b opened this issue Oct 3, 2022 · 1 comment
Open

Handle http status code 429 #25

krzysiek-b opened this issue Oct 3, 2022 · 1 comment

Comments

@krzysiek-b
Copy link

krzysiek-b commented Oct 3, 2022

Running your script ends with Too many request error

Expected
Script should work under available API limits.
https://learn.microsoft.com/en-us/graph/throttling

@alexourique
Copy link

alexourique commented Oct 26, 2022

I'm not a developer. But i have fixed this by editing file backup.js:

  1. Add on Line 5: add: "const delay = ms => new Promise(res => setTimeout(res, ms));"
  2. Add on line 69: " await delay(1000);"

This will make the execution wait for 1 second every interation.

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

No branches or pull requests

2 participants