Skip to content

Bug: opening a project task modal fires listWorkflows with an empty org id → uncaught ORG_NOT_FOUND ConvexError #2668

Closed

Description

@yannickmonney

Problem

Opening any project task modal logs an uncaught ConvexError — listWorkflows is called with an empty organization id and the server throws ORG_NOT_FOUND: "Organization id is required." The modal's actor directory fires the workflow list before the org id resolves, and unlike its sibling useReadWorkflow (which guards enabled: !!workflowSlug), useListWorkflows has no enabled skip-guard for a falsy org id — and the server throws rather than returning empty. Console-only (the assignee picker still works), but it's an uncaught Server Error on a very common action.

Current behaviour

Verified live (2026-07-11, main @ 94ef84e), deterministic across multiple tasks:

  1. Open a project's Tasks board → click any task card.
  2. Console logs (board load alone is clean — fires only on modal open):
    [CONVEX A(workflows/file_actions:listWorkflows)] Uncaught ConvexError:
    {"code":"ORG_NOT_FOUND","message":"Organization id is required."}
    at handler (../../convex/workflows/file_actions.ts:217:6)
    

Code pointers

  • app/features/tasks/hooks/use-actor-directory.ts:64 — useListWorkflows(organizationId) with no falsy-org guard (used by task-modal / assignee-picker / task-comments / mention-text)
  • app/features/workflows/hooks/file-queries.ts:21-31 — useListWorkflows has no enabled option (cf. useReadWorkflow at :33-44 which guards)
  • convex/workflows/file_actions.ts:217 — listWorkflows throws ORG_NOT_FOUND on empty id

Proposed change

Guard useListWorkflows with enabled: !!organizationId (as useReadWorkflow does), and/or have listWorkflows return [] for an empty id instead of throwing.

Acceptance criteria

  • Opening a task modal logs no ConvexError
  • listWorkflows isn't fired with an empty org id (or returns empty rather than throwing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority: lowservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions