news-catalyst / next-tinynewsdemo

Frontend for Tiny News Collective organizations
https://next-tinynewsdemo.vercel.app
1 stars 0 forks source link

Add retry to Graphql http calls and error checking for letterhead ad fetch code #1328

Closed angel-tnc closed 1 year ago

angel-tnc commented 1 year ago

Why

A lot of the errors found on the Vercel build runs are related to the way the fetch library is used on the static build steps, especially when contacting Letterhead and Hasura. The usage generates many simultaneous connections with short timeouts and is prone to dropped connection errors. Also, the code that fetches letterhead ads has limited error handling and generates a lot of bad logs.

What

This fix creates a new http module with a fetchWithRetry function that allows more stable handling of simultaneous connections and adds error checking to the code that fetches Letterhead ads.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
staging-tiny-news-sites 🛑 Canceled (Inspect) Apr 5, 2023 0:43am
2 Ignored Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **tiny-news-curriculum** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/tiny-news-curriculum/8QDmUUcwp1aB8Z7AJM1cHkMiweCY)) | | | Apr 5, 2023 0:43am | | **tiny-news-sites** | ⬜️ Ignored ([Inspect](https://vercel.com/news-catalyst/tiny-news-sites/6YsNj4VVxSHyDP1dPvBJ8HDdQXHF)) | | | Apr 5, 2023 0:43am |