File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,17 @@ class DbtNotInstalledException(Exception):
2121class DbtParseException (Exception ):
2222 """Raised when dbt parse fails."""
2323
24- def __init__ (self , message : str , root_cause : Any | None = None ):
24+ def __init__ (self , root_cause : Any | None = None ):
2525 """Initialize the exception."""
26- super ().__init__ (message )
26+ super ().__init__ ()
2727 self .root_cause = root_cause
2828
2929 def __str__ (self ) -> str :
3030 """Return a string representation of the exception."""
3131 if self .root_cause :
32- return f"{ self .args [0 ]} \n \n Root cause: { self .root_cause !s} "
33- return str (self .args [0 ])
32+ return f"\n \n Root cause: { self .root_cause !s} "
33+
34+ return "Root cause not found. Please run `dbt parse` manually."
3435
3536
3637class DbtLsException (Exception ):
@@ -72,7 +73,7 @@ def dbt_parse() -> "dbtRunnerResult":
7273 result : "dbtRunnerResult" = dbtRunner ().invoke (["parse" ])
7374
7475 if not result .success :
75- raise DbtParseException ("dbt parse failed." , root_cause = result .exception )
76+ raise DbtParseException (root_cause = result .exception )
7677
7778 return result
7879
You can’t perform that action at this time.
0 commit comments