convex-security
Installation
SKILL.md
Convex Security
Error Handling with ConvexError
Use ConvexError for user-facing errors with structured error codes:
import { ConvexError } from "convex/values";
export const updateTask = mutation({
args: { taskId: v.id("tasks"), title: v.string() },
returns: v.null(),
handler: async (ctx, args) => {
const task = await ctx.db.get("tasks", args.taskId);