From a5797eae8d75942b05b9766829c972cb74194815 Mon Sep 17 00:00:00 2001 From: Sujay Jayakar Date: Tue, 3 Sep 2024 16:48:30 -0400 Subject: [PATCH] Include component path in schema error message (#29470) GitOrigin-RevId: c593a26cdb942c184e4696d2011ff1948ece7f14 --- src/cli/lib/deploy2.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli/lib/deploy2.ts b/src/cli/lib/deploy2.ts index 0100a04..5f841e0 100644 --- a/src/cli/lib/deploy2.ts +++ b/src/cli/lib/deploy2.ts @@ -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,