-
-
Notifications
You must be signed in to change notification settings - Fork 450
🐛 Bug: Homepage crashes when calendar fetch fails #2368
Copy link
Copy link
Open
Labels
Status: TriageThis is the initial status for an issue that requires triage.This is the initial status for an issue that requires triage.🐛 BugIndicates that the issue is a bug or defect.Indicates that the issue is a bug or defect.
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: TriageThis is the initial status for an issue that requires triage.This is the initial status for an issue that requires triage.🐛 BugIndicates that the issue is a bug or defect.Indicates that the issue is a bug or defect.