Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def on_exception(self, exception: StreamThreadException) -> Iterable[AirbyteMess
yield exception.exception.as_airbyte_message(stream_descriptor=stream_descriptor)
else:
yield AirbyteTracedException.from_exception(
exception, stream_descriptor=stream_descriptor
exception.exception,
stream_descriptor=stream_descriptor,
message=str(exception.exception),
).as_airbyte_message()
Comment thread
pnilan marked this conversation as resolved.

def _flag_exception(self, stream_name: str, exception: Exception) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,13 +1288,13 @@ def test_handle_read_external_requests(deployment_mode, url_base, expected_error
pytest.param(
"CLOUD",
"https://10.0.27.27/tokens/bearer",
"StreamThreadException",
"Error while refreshing access token",
id="test_cloud_read_with_private_endpoint",
),
pytest.param(
"CLOUD",
"http://unsecured.protocol/tokens/bearer",
"StreamThreadException",
"Invalid Protocol Scheme",
id="test_cloud_read_with_unsecured_endpoint",
),
pytest.param(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,8 @@ def test_on_exception_return_trace_message_and_on_stream_complete_return_stream_

exception_messages = list(handler.on_exception(exception))
assert len(exception_messages) == 1
assert "StreamThreadException" in exception_messages[0].trace.error.stack_trace
assert "RuntimeError" in exception_messages[0].trace.error.stack_trace
assert exception_messages[0].trace.error.message == "Something went wrong"

assert list(
handler.on_partition_complete_sentinel(
Expand Down
Loading