1515 INJECTED_COMPONENTS_PY_CHECKSUMS ,
1616)
1717from airbyte_cdk .utils .airbyte_secrets_utils import filter_secrets
18- from airbyte_cdk .utils .traced_exception import AirbyteTracedException
1918
2019from ..api_models import (
2120 CheckRequest ,
@@ -129,11 +128,8 @@ def test_read(request: StreamTestReadRequest) -> StreamReadResponse:
129128 )
130129 return StreamReadResponse .model_validate (asdict (cdk_result ))
131130 except Exception as exc :
132- error = AirbyteTracedException .from_exception (
133- exc , message = f"Error reading stream: { str (exc )} "
134- )
135131 # Filter secrets from error message before returning to client
136- sanitized_message = filter_secrets (error . message or str (exc ))
132+ sanitized_message = filter_secrets (f"Error reading stream: { str (exc )} " )
137133 raise HTTPException (status_code = 400 , detail = sanitized_message )
138134
139135
@@ -159,11 +155,8 @@ def check(request: CheckRequest) -> CheckResponse:
159155 success , message = runner .check_connection (request .config .model_dump ())
160156 return CheckResponse (success = success , message = message )
161157 except Exception as exc :
162- error = AirbyteTracedException .from_exception (
163- exc , message = f"Error checking connection: { str (exc )} "
164- )
165158 # Filter secrets from error message before returning to client
166- sanitized_message = filter_secrets (error . message or str (exc ))
159+ sanitized_message = filter_secrets (f"Error checking connection: { str (exc )} " )
167160 raise HTTPException (status_code = 400 , detail = sanitized_message )
168161
169162
@@ -196,11 +189,8 @@ def discover(request: DiscoverRequest) -> DiscoverResponse:
196189 # Re-raise HTTPExceptions as-is (like the catalog None check above)
197190 raise
198191 except Exception as exc :
199- error = AirbyteTracedException .from_exception (
200- exc , message = f"Error discovering streams: { str (exc )} "
201- )
202192 # Filter secrets from error message before returning to client
203- sanitized_message = filter_secrets (error . message or str (exc ))
193+ sanitized_message = filter_secrets (f"Error discovering streams: { str (exc )} " )
204194 raise HTTPException (status_code = 400 , detail = sanitized_message )
205195
206196
@@ -224,11 +214,8 @@ def resolve(request: ResolveRequest) -> ManifestResponse:
224214 source = safe_build_source (request .manifest .model_dump (), {})
225215 return ManifestResponse (manifest = Manifest (** source .resolved_manifest ))
226216 except Exception as exc :
227- error = AirbyteTracedException .from_exception (
228- exc , message = f"Error resolving manifest: { str (exc )} "
229- )
230217 # Filter secrets from error message before returning to client
231- sanitized_message = filter_secrets (error . message or str (exc ))
218+ sanitized_message = filter_secrets (f"Error resolving manifest: { str (exc )} " )
232219 raise HTTPException (status_code = 400 , detail = sanitized_message )
233220
234221
@@ -272,9 +259,6 @@ def full_resolve(request: FullResolveRequest) -> ManifestResponse:
272259 manifest ["streams" ] = streams
273260 return ManifestResponse (manifest = Manifest (** manifest ))
274261 except Exception as exc :
275- error = AirbyteTracedException .from_exception (
276- exc , message = f"Error full resolving manifest: { str (exc )} "
277- )
278262 # Filter secrets from error message before returning to client
279- sanitized_message = filter_secrets (error . message or str (exc ))
263+ sanitized_message = filter_secrets (f"Error full resolving manifest: { str (exc )} " )
280264 raise HTTPException (status_code = 400 , detail = sanitized_message )
0 commit comments