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
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
datesInfovalue becomes undefined. This causes:.map()on null/undefinedThis results in the homepage failing to load.
Steps To Reproduce
yarn devExpected 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]
Are you working on this issue?
Yes
Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)
No