Convex Error
can someone tell me why the exception shows in console ? and is there any workaround to fix this ? is there any way i can remove this from the browser console ? or will it automatically remove in the production ?
this is my code just in case
import { v, ConvexError } from "convex/values";
import { mutation } from "../_generated/server";
export const validateUser = mutation({
args: {
email: v.string(),
password: v.string(),
},
handler: async (ctx, args) => {
const user = await ctx.db.query("users").filter((q) => q.eq(q.field('email'), args.email)).filter((q) => q.eq(q.field('password'), args.password)).first();
if (!user) {
throw new ConvexError({
code: 123,
severity: "high",
});
}
return user;
},
});

2 Replies
It will not show up in production. See https://docs.convex.dev/functions/debugging#debugging-during-development
Debugging | Convex Developer Hub
Debugging is the process of figuring out why your code isn't behaving as you
thanks alot