@@ -52,24 +52,18 @@ def test_detects_oauth_token_expired(self) -> None:
5252 )
5353
5454 def test_case_insensitive (self ) -> None :
55- assert _is_platform_credential_error (
56- "sso AUTHENTICATION Has Expired"
57- )
55+ assert _is_platform_credential_error ("sso AUTHENTICATION Has Expired" )
5856
5957 def test_does_not_match_generic_query_error (self ) -> None :
60- assert not _is_platform_credential_error (
61- "column 'revenue' not found in table"
62- )
58+ assert not _is_platform_credential_error ("column 'revenue' not found in table" )
6359
6460 def test_does_not_match_syntax_error (self ) -> None :
6561 assert not _is_platform_credential_error (
6662 "SQL compilation error: syntax error at position 42"
6763 )
6864
6965 def test_does_not_match_timeout_error (self ) -> None :
70- assert not _is_platform_credential_error (
71- "Query timed out after 60 seconds"
72- )
66+ assert not _is_platform_credential_error ("Query timed out after 60 seconds" )
7367
7468 def test_does_not_match_empty_string (self ) -> None :
7569 assert not _is_platform_credential_error ("" )
@@ -107,7 +101,7 @@ def test_query_failed_error_with_credential_message_includes_hint(
107101 """QueryFailedError wrapping a credential expiry should also get the hint."""
108102 error = Exception (
109103 'QueryFailedError(["SSO authentication has expired, '
110- " please re-connect to Snowflake\ " ])"
104+ ' please re-connect to Snowflake"])'
111105 )
112106 result = fetcher ._format_semantic_layer_error (error )
113107 assert "dbt Cloud" in result
@@ -118,7 +112,8 @@ def test_format_query_failed_error_with_credential_message(self, fetcher) -> Non
118112 from dbtsl .error import QueryFailedError
119113
120114 error = QueryFailedError (
121- "SSO authentication has expired, please re-connect to Snowflake"
115+ message = "SSO authentication has expired, please re-connect to Snowflake" ,
116+ status = "FAILED" ,
122117 )
123118 result = fetcher ._format_query_failed_error (error )
124119 assert "dbt Cloud" in result .error
0 commit comments