-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
fix(fetch): fixup generators and add error handling #8395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8395 +/- ##
==========================================
- Coverage 76.40% 73.69% -2.71%
==========================================
Files 118 108 -10
Lines 9928 9177 -751
Branches 334 309 -25
==========================================
- Hits 7585 6763 -822
- Misses 2341 2412 +71
Partials 2 2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors data generator functions to use promise chain syntax (.then().catch()) instead of async/await, addressing fetch failures during deployments. The changes improve error handling by ensuring that failed fetch operations return safe default values instead of breaking the build.
Key Changes:
- Refactored
vulnerabilities.mjsandsupportersData.mjsgenerators to use.then().catch()pattern with fallback values - Added
supporters.tstype definitions file and exported it from the types index - Moved
OPENCOLLECTIVE_MEMBERS_URLconstant from inline definition to centralizednext.constants.mjs
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
apps/site/types/supporters.ts |
Adds type definitions for Supporter and OpenCollectiveSupporter |
apps/site/types/index.ts |
Exports the new supporters type module |
apps/site/next.constants.mjs |
Adds OPENCOLLECTIVE_MEMBERS_URL constant for centralized configuration |
apps/site/next-data/generators/vulnerabilities.mjs |
Refactors async function to arrow function with promise chains and error handling |
apps/site/next-data/generators/supportersData.mjs |
Refactors async function to arrow function with promise chains, uses centralized constant |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Build Size ComparisonSummary
Changes➕ Added Assets (1)
➖ Removed Assets (1)
|
|
@nodejs/nodejs-website PTAL |
|
Fetch is still timing out occasionally :-/ https://vercel.com/openjs/nodejs-org/EeD4bMYCN1DPW8Zj3BEaNmq3wv1N |
| throw e; | ||
| } | ||
|
|
||
| await setTimeout(delay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add a backoff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYM?
This PR:
.then().catch()format