Skip to content

Commit efd9d7d

Browse files
authored
Apply suggestions from code review
1 parent 820d9e8 commit efd9d7d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

airbyte_cdk/test/entrypoint_wrapper.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class AirbyteEntrypointException(Exception):
6161
Example Usage:
6262
output = EntrypointOutput(...)
6363
if output.errors:
64-
raise output.as_exception("An error occurred during the connector execution.")
64+
raise output.as_exception()
6565
"""
6666

6767

@@ -217,17 +217,16 @@ def get_formatted_error_message(self) -> str:
217217
return result
218218

219219
def as_exception(self) -> AirbyteEntrypointException:
220-
"""Convert the output to an exception with a custom message.
221-
222-
This is useful for raising an exception in tests or other scenarios where you want to
223-
provide a specific error message.
224-
"""
220+
"""Convert the output to an exception."""
225221
return AirbyteEntrypointException(self.get_formatted_error_message())
226222

227223
def raise_if_errors(
228224
self,
229225
) -> None:
230-
"""Raise an exception if there are errors in the output."""
226+
"""Raise an exception if there are errors in the output.
227+
228+
Otherwise, do nothing.
229+
"""
231230
if not self.errors:
232231
return None
233232

0 commit comments

Comments
 (0)