Skip to content

Commit 84ff0ac

Browse files
raxod502WhyNotHugo
authored andcommitted
Log error response body in debug
1 parent 388c16f commit 84ff0ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vdirsyncer/http.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ async def request(
223223
logger.debug(response.headers)
224224
logger.debug(response.content)
225225

226+
if logger.getEffectiveLevel() <= logging.DEBUG and response.status >= 400:
227+
# https://github.com/pimutils/vdirsyncer/issues/1186
228+
logger.debug(await response.text())
229+
226230
if response.status == 412:
227231
raise exceptions.PreconditionFailed(response.reason)
228232
if response.status in (404, 410):

0 commit comments

Comments
 (0)