Closed prateek2211 closed 2 years ago
Sometimes, codeforces API gives 502 error. So, it would be better to retry calling these APIs with some delay. Something like this is done in submission fetching. https://github.com/mdg-iitr/codephile-backend/blob/a9d465b390fa247e8a901a47733216f0d40b4928/scrappers/codeforces/scrapper.go#L83
If after all the retries, error still occurs. Then log the error in sentry, and return 502 error code in case of handle check API.
Sometimes, codeforces API gives 502 error. So, it would be better to retry calling these APIs with some delay. Something like this is done in submission fetching. https://github.com/mdg-iitr/codephile-backend/blob/a9d465b390fa247e8a901a47733216f0d40b4928/scrappers/codeforces/scrapper.go#L83
If after all the retries, error still occurs. Then log the error in sentry, and return 502 error code in case of handle check API.