Skip to content

Commit

Permalink
Print out dbt's exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
elongl committed Jul 17, 2024
1 parent bdca08a commit c7fd3ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion elementary/clients/dbt/api_dbt_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ def collect_dbt_command_logs(event):
res: dbtRunnerResult = dbt.invoke(dbt_command_args)
output = "\n".join(dbt_logs) or None
if self.raise_on_failure and not res.success:
raise DbtCommandError(base_command_args=dbt_command_args, err_msg=output)
raise DbtCommandError(
base_command_args=dbt_command_args,
err_msg=(str(res.exception) or output),
)

return APIDbtCommandResult(success=res.success, output=output, result_obj=res)

Expand Down

0 comments on commit c7fd3ae

Please sign in to comment.