You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
execDbtCompile / execDbtCompileInline mask real dbt errors with generic wrapper message #943
When dbt compile or dbt compile --inline fails with a real dbt error (e.g. Compilation Error: Model 'foo' depends on a node named 'bar' which was not found), execDbtCompile and execDbtCompileInline in packages/dbt-tools/src/dbt-cli.ts surface a generic wrapper message that masks the actual cause. Users see "Could not compile … Last error: Command failed: …" instead of the structured dbt error they need to fix the problem.
Root cause
Both functions wrap run() in a try { … } catch { lines = [] } that swallows the run-time error entirely:
The structured level: "error" event present in dbt's JSON log on a crashed run is never inspected, and the final throw embeds Node's generic Command failed: … message rather than dbt's category-prefixed error (Compilation Error: …, Database Error: …, etc.).
Expected
Both functions should mirror the pattern already in place for execDbtShow: capture the run error, parse level: "error" events from any partial stdout, and surface the real dbt error via the existing extractDbtError helper (with the same SQL-redaction guarantees provided by fallbackExitMessage).
Suggested fix
Extract a shared runWithErrorBubbling(args, label) helper from the execDbtShow pattern and apply to all three execDbt* functions, so error UX is consistent across the surface.
Fixed by 32ffe32af in #933. Both execDbtCompile and execDbtCompileInline now capture the run error, skip success-only tiers on crash (same anti-spurious-data reasoning as execDbtShow), and throw via a new shared bubbleDbtError(label, primary, plain) helper. The helper produces a message with the same guarantees as execDbtShow's error UX: structured JSON event > stderr > redacted exit-status, ANSI stripped, no doubled prefix on dbt category errors.
Activity
fix(dbt-tools): bubble real dbt show error correctly + redact SQL on …
fix(dbt-tools): bubble real errors and redact SQL across all execDbt*…
sahrizvi commentedon Jun 15, 2026
Fixed by
32ffe32afin #933. BothexecDbtCompileandexecDbtCompileInlinenow capture the run error, skip success-only tiers on crash (same anti-spurious-data reasoning asexecDbtShow), and throw via a new sharedbubbleDbtError(label, primary, plain)helper. The helper produces a message with the same guarantees asexecDbtShow's error UX: structured JSON event > stderr > redacted exit-status, ANSI stripped, no doubled prefix on dbt category errors.fix: bubble real dbt show error instead of generic "Could not parse" (A…