Skip to content

Commit

Permalink
fix: enrich logs (#6206)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanFM authored Sep 26, 2024
1 parent 449e087 commit c933e49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jina/clients/base/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async def send_message(self, url, request: 'Request'):
handle_response_status(r_status, r_str, url)
return r_status, r_str
except (ValueError, ConnectionError, BadClient, aiohttp.ClientError, aiohttp.ClientConnectionError) as err:
self.logger.debug(f'Got an error: {err} sending POST to {url} in attempt {attempt}/{self.max_attempts}')
self.logger.debug(f'Got an error of type {type(err)}: {err} sending POST to {url} in attempt {attempt}/{self.max_attempts}')
await retry.wait_or_raise_err(
attempt=attempt,
err=err,
Expand All @@ -191,7 +191,7 @@ async def send_message(self, url, request: 'Request'):
)
except Exception as exc:
self.logger.debug(
f'Got a non-retried error: {exc} sending POST to {url}')
f'Got a non-retried error of type {type(exc)}: {exc} sending POST to {url}')
raise exc

async def send_streaming_message(self, url, doc: 'Document', on: str):
Expand Down
2 changes: 1 addition & 1 deletion jina/serve/stream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ async def stream(
except (
Exception
) as err: # HTTP and WS need different treatment further up the stack
self.logger.error(f'Error while getting responses from deployments: {err}')
self.logger.error(f'Error while getting responses from deployments {type(err)}: {err}')
raise err

async def _stream_requests(
Expand Down

0 comments on commit c933e49

Please sign in to comment.