In production this code fails to retrieve data like 80% of the time. I added some debugging code to retry the request in the worker and it sometimes will fail the first x requests and eventually works and sometimes it fails all the requests. When running locally it works 100% of the time.
Is there a way I can run cloudflare workers on my own servers (open to suggestions for cloud providers) , or a way to fix my code to make this work 100% of the time?
Here is a link you can open to test and the source code is attached