@@ -1442,11 +1442,10 @@ def test_read_stream_error_message_does_not_contain_config_and_catalog():
14421442 # Mock the source
14431443 mock_source = MagicMock ()
14441444
1445- # Patch the handler to raise a meaningful exception
14461445 with patch (
14471446 "airbyte_cdk.connector_builder.test_reader.TestReader.run_test_read"
14481447 ) as mock_handler :
1449- # Simulate a common error like the datetime parsing error from the user's example
1448+ # Simulate a common error like a datetime parsing error
14501449 mock_handler .side_effect = ValueError ("time data '' does not match format '%Y-%m-%dT%H:%M:%SZ'" )
14511450
14521451 # Call the read_stream function
@@ -1463,15 +1462,14 @@ def test_read_stream_error_message_does_not_contain_config_and_catalog():
14631462 assert "__injected_declarative_manifest" not in user_message
14641463
14651464 # But it should contain the actual error
1466- assert "time data" in user_message
1467- assert " does not match format" in user_message
1465+ stream_name = catalog . streams [ 0 ]. stream . name
1466+ assert user_message == f"Error reading stream { stream_name } : time data '' does not match format '%Y-%m-%dT%H:%M:%SZ'"
14681467
14691468 # The internal message should contain technical details for debugging
14701469 internal_message = response .trace .error .internal_message
14711470 assert "verbose_config_data" in internal_message
14721471 assert "verbose_catalog_schema" in internal_message
1473- assert "Error reading stream with config=" in internal_message
1474- assert "and catalog=" in internal_message
1472+ assert f"Error reading stream { stream_name } with config=" in internal_message
14751473
14761474
14771475def test_full_resolve_manifest (valid_resolve_manifest_config_file ):
0 commit comments