guardian / gudocs

2 stars 1 forks source link

Fix bug in retry code #67

Closed davidfurey closed 5 months ago

davidfurey commented 5 months ago

When the limiter code was added, a bug was introduced that causes the error error: ReferenceError: req is not defined if a retry is attempted.

We can fix this by giving the limited function a name (req) and returning it.

Since fixing this bug would introduce unbounded retries, which might cause problems, I've also limited the number of retries to 3 attempts in total.

davidfurey commented 5 months ago

Testing in production now