diff --git a/spectacles/exceptions.py b/spectacles/exceptions.py index 16c3a673..065eb4cd 100644 --- a/spectacles/exceptions.py +++ b/spectacles/exceptions.py @@ -135,7 +135,7 @@ def __init__( model: str, explore: str, dimension: Optional[str], - sql: str, + sql: Optional[str], message: str, line_number: Optional[int] = None, explore_url: Optional[str] = None, diff --git a/spectacles/types.py b/spectacles/types.py index c4576369..50e23031 100644 --- a/spectacles/types.py +++ b/spectacles/types.py @@ -61,7 +61,7 @@ class ErrorData(BaseModel): class MultiErrorData(BaseModel): id: str runtime: float - sql: str + sql: Optional[str] errors: Optional[Tuple[QueryError, ...]] status: Literal["error"] @@ -72,7 +72,7 @@ def runtime(self) -> float: return self.data.runtime @property - def sql(self) -> str: + def sql(self) -> Optional[str]: return self.data.sql @property