BurdB
Convex Community2y ago
2 replies
Burd

Error: Unable to run schema validation

Hey team, I'm getting an

Error: Unable to run schema validation on https://charming-armadillo-264.convex.cloud
Error fetching POST https://charming-armadillo-264.convex.cloud/api/prepare_schema 403 Forbidden: BadDeployKey: The provided deploy key was invalid for deployment 'charming-armadillo-264'. Double check that the environment this key was generated for matches the desired deployment.

this is the query I added


export const getByDocumentId = query({
  args: {
    document_id: v.string(),
  },
  handler: async (ctx, args) => {
    const identity = await ctx.auth.getUserIdentity();

    if (!identity) {
      throw new Error("Unauthorized");
    }

    if (!args.document_id) {
      throw new Error("Document ID is missing");
    }

    const documents = await ctx.db
      .query("documents")
      .filter((q) => q.eq(q.field("document_id"), args.document_id))
      .collect();

    return documents;
  },
});


any hints?
Was this page helpful?