json-schema-org / json-schema-org/website
🐛 Bug: Homepage crashes when calendar fetch fails
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 169
- Forks
- 484
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 6
Description
Describe the bug
The homepage crashes when the external Google Calendar fetch fails.
When the calendar request fails (e.g., due to network/DNS issues), the datesInfo value becomes undefined. This causes:
- A serialization error in getStaticProps
- A runtime error when the UI attempts to call
.map()on null/undefined
This results in the homepage failing to load.
Steps To Reproduce
- Clone and run the project locally
- Run
yarn dev - Simulate failure of the external calendar API (e.g., disconnect internet or block access to calendar.google.com)
- This issue occurs when the external calendar API is unavailable (e.g., DNS failure, firewall blocking, or network issues).
- Open http://localhost:3000
- Observe that the homepage crashes
Expected Behavior
The website should load successfully even if the calendar fetch fails.
The application should gracefully handle the failure and fallback to a safe value (e.g., null or empty list) instead of crashing.
Screenshots
Homepage error showing "Error serializing .datesInfo" and map crash
Device Information [optional]
- OS:
- Browser:
- version:
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the homepage's getStaticProps and trace how the external Google Calendar response becomes datesInfo, then reproduce the failure with yarn dev while blocking calendar.google.com. Confirm that the homepage loads when the fetch fails, serialization succeeds, and the UI does not call map on an undefined value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, next.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100