Skip to content

Commit

Permalink
[airbyte-cdk] Update HttpClient to return correct error message in ca…
Browse files Browse the repository at this point in the history
…se of FAIL/IGNORE (#42512)
  • Loading branch information
pnilan authored Jul 26, 2024
1 parent 26e4905 commit 9537394
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def _send(
print(f"{message}\n", end="", flush=True)

if error_resolution.response_action == ResponseAction.FAIL:
if response:
if response is not None:
error_message = f"'{request.method}' request to '{request.url}' failed with status code '{response.status_code}' and error message '{self._error_message_parser.parse_response_error_message(response)}'"
else:
error_message = f"'{request.method}' request to '{request.url}' failed with exception: '{exc}'"
Expand All @@ -304,7 +304,7 @@ def _send(
)

elif error_resolution.response_action == ResponseAction.IGNORE:
if response:
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
Loading

0 comments on commit 9537394

Please sign in to comment.