Skip to content

🐛 Bug: Homepage crashes when calendar fetch fails #2368

@tusharv01

Description

@tusharv01

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

  1. Clone and run the project locally
  2. Run yarn dev
  3. Simulate failure of the external calendar API (e.g., disconnect internet or block access to calendar.google.com)
  4. This issue occurs when the external calendar API is unavailable (e.g., DNS failure, firewall blocking, or network issues).
  5. Open http://localhost:3000
  6. 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

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageThis is the initial status for an issue that requires triage.🐛 BugIndicates that the issue is a bug or defect.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions