Skip to content

Commit

Permalink
Include component path in schema error message (#29470)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: c593a26cdb942c184e4696d2011ff1948ece7f14
  • Loading branch information
sujayakar authored and Convex, Inc. committed Sep 3, 2024
1 parent e0f304e commit a5797ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cli/lib/deploy2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ export async function waitForSchema(
// Schema validation failed. This could be either because the data
// is bad or the schema is wrong. Classify this as a filesystem error
// because adjusting `schema.ts` is the most normal next step.
logFailure(ctx, "Schema validation failed");
let msg = "Schema validation failed";
if (currentStatus.componentPath) {
msg += ` in component "${currentStatus.componentPath}"`;
}
msg += ".";
logFailure(ctx, msg);
logError(ctx, chalk.red(`${currentStatus.error}`));
return await ctx.crash({
exitCode: 1,
Expand Down

0 comments on commit a5797ea

Please sign in to comment.