Skip to content

Commit e3973ed

Browse files
fix: simplify external error message per review feedback
Co-Authored-By: suisui.xia <suisui.xia@airbyte.io>
1 parent 22e3549 commit e3973ed

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

airbyte_cdk/entrypoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def airbyte_message_to_string(airbyte_message: AirbyteMessage) -> str:
348348
raise AirbyteTracedException(
349349
internal_message=f"Failed to serialize AirbyteMessage to JSON: `{json_exception}`",
350350
failure_type=FailureType.system_error,
351-
message=f"A record could not be serialized to JSON: `{json_exception}`. The sync will be stopped to prevent data corruption. Please verify the source is returning valid data types.",
351+
message="A record returned from the API failed to be serialized to JSON.",
352352
) from json_exception
353353

354354
@classmethod

unit_tests/test_entrypoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,5 +873,5 @@ def test_given_non_json_serializable_type_then_raise_traced_exception(
873873
mocker.patch.object(MockSource, "read_catalog", return_value={})
874874
mocker.patch.object(MockSource, "read", return_value=[record])
875875

876-
with pytest.raises(AirbyteTracedException, match="could not be serialized to JSON"):
876+
with pytest.raises(AirbyteTracedException, match="failed to be serialized to JSON"):
877877
list(entrypoint.run(parsed_args))

0 commit comments

Comments
 (0)