Skip to content

Commit

Permalink
updated after the review
Browse files Browse the repository at this point in the history
  • Loading branch information
bazarnov committed Nov 27, 2024
1 parent f64ad36 commit af80a4a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions airbyte_cdk/sources/streams/http/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,17 +396,15 @@ def _handle_error_resolution(
f"'{request.method}' request to '{request.url}' failed with exception: '{exc}'"
)

exception = MessageRepresentationAirbyteTracedErrors(
# ensure the exception message is emitted before raised
self._logger.error(error_message)

raise MessageRepresentationAirbyteTracedErrors(
internal_message=error_message,
message=error_resolution.error_message or error_message,
failure_type=error_resolution.failure_type,
)

# ensure the exception message is emitted before raised
exception.emit_message()

raise exception

elif error_resolution.response_action == ResponseAction.IGNORE:
if response is not None:
log_message = f"Ignoring response for '{request.method}' request to '{request.url}' with response code '{response.status_code}'"
Expand Down

0 comments on commit af80a4a

Please sign in to comment.