Skip to content

Bug: Events page shows 'Something went wrong' - API returns 400 due to null values #284

@supg

Description

@supg

Description

The Events page on a self-hosted OpenPanel instance displays "Something went wrong" error. The dashboard is sending null values for optional API parameters instead of omitting them, causing Zod validation failures.

Environment

  • OpenPanel: Self-hosted via Kubernetes (k3s)
  • Images: lindesvard/openpanel-api:latest, lindesvard/openpanel-dashboard:latest
  • Pulled: January 24, 2026

Console Error

TypeError: Cannot destructure property 'name' of 't.original' as it is undefined.
    at cell (https://openpanel.aristotleaccounting.ca/_next/static/chunks/9779-a23f3d4ccf7bbd69.js:1:4861)

API Response (400 BAD_REQUEST)

{
  "error": {
    "json": {
      "message": "[{\"code\":\"invalid_type\",\"expected\":\"string\",\"received\":\"null\",\"path\":[\"profileId\"]},{\"code\":\"invalid_type\",\"expected\":\"string\",\"received\":\"null\",\"path\":[\"cursor\"]},{\"code\":\"invalid_type\",\"expected\":\"date\",\"received\":\"null\",\"path\":[\"startDate\"]},{\"code\":\"invalid_type\",\"expected\":\"date\",\"received\":\"null\",\"path\":[\"endDate\"]}]",
      "code": -32600,
      "data": {
        "code": "BAD_REQUEST",
        "httpStatus": 400,
        "path": "event.events"
      }
    }
  }
}

Network Request

The dashboard sends:

/api/trpc/event.events?input={"json":{"projectId":"time-tracker","filters":[],"events":[],"profileId":null,"startDate":null,"endDate":null,"cursor":null}}

Note: The first request includes meta.values that maps nulls to undefined (returns 200), but a second request without the meta section fails with 400.

Expected Behavior

Events page should load and display events.

Actual Behavior

Page shows "Something went wrong" error due to API validation failure.

Steps to Reproduce

  1. Navigate to Events page on self-hosted instance
  2. Page immediately shows "Something went wrong"
  3. Check browser console for TypeError
  4. Check network tab for 400 response on event.events API call

Workaround Attempted

  • Restarted dashboard and API pods - no change
  • Verified ClickHouse and other services are healthy

Related

Possibly related to #279 (Profiles page paging issue) - both seem to involve API request parameter handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions