Skip to content

Commit 5dcc0e5

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(client): log response headers in debug mode (#366)
1 parent a7253ed commit 5dcc0e5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/finch/_base_client.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,8 @@ def _request(
946946
if self.custom_auth is not None:
947947
kwargs["auth"] = self.custom_auth
948948

949+
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
950+
949951
try:
950952
response = self._client.send(
951953
request,
@@ -984,7 +986,12 @@ def _request(
984986
raise APIConnectionError(request=request) from err
985987

986988
log.debug(
987-
'HTTP Request: %s %s "%i %s"', request.method, request.url, response.status_code, response.reason_phrase
989+
'HTTP Response: %s %s "%i %s" %s',
990+
request.method,
991+
request.url,
992+
response.status_code,
993+
response.reason_phrase,
994+
response.headers,
988995
)
989996

990997
try:

0 commit comments

Comments
 (0)