Skip to content

Bug: agents/mutations.ts + agents/webhooks/mutations.ts — agent management mutations throw raw Error #2017

Description

@yannickmonney

Area

services/platform/convex/agents/mutations.ts, agents/webhooks/mutations.ts, agents/webhooks/queries.ts.

Steps to reproduce

  1. Attempt to update agent sharing as a non-admin.
  2. Attempt webhook management (create/update/delete) while unauthenticated or for an unknown webhook.
  3. All rejections surface as opaque "Server Error".

Expected

User-facing permission and not-found errors should be ConvexError({ code: ... }).

Actual

agents/mutations.ts:

  • line 90 — Unauthenticated (bindAgent)
  • line 130 — Unauthenticated (updateAgentSharing)
  • line 140 — Only admins can update agent sharing
  • line 183 — Unauthenticated (another mutation)
  • line 257 — Unauthenticated

agents/webhooks/mutations.ts:

  • line 20 — Unauthenticated (createWebhook)
  • line 25 — Invalid agent slug
  • line 52 — Unauthenticated (updateWebhook)
  • line 55 — Webhook not found
  • line 69 — Unauthenticated (deleteWebhook)
  • line 72 — Webhook not found

agents/webhooks/queries.ts:

  • line 14 — Unauthenticated (listWebhooks)

Evidence

  • services/platform/convex/agents/mutations.ts:89-91, :129-141, :182-184
  • services/platform/convex/agents/webhooks/mutations.ts:20-72
  • services/platform/convex/agents/webhooks/queries.ts:14

Notes

Webhook operations are user-visible in the agent-editor Webhooks tab. Errors should be distinguishable.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions