catch response body with ClientResponseError #5566
-
HI all idea with pseudo code: async with session.get(url) as resp:
try:
resp.raise_for_status()
return await resp.json()
except ClientResponseError as e:
logger.debug(await resp.json()) |
Beta Was this translation helpful? Give feedback.
Answered by
Dreamsorcerer
Mar 26, 2021
Replies: 1 comment
-
Looks like the response is released when raised, so not something that is currently supported. Probably easiest to try without |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
a5r0n
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like the response is released when raised, so not something that is currently supported.
Probably easiest to try without
raise_for_status()
.