Skip to content

Commit b34b275

Browse files
committed
Fix issue where aiohttp.ClientResponse data wasn't being awaited on during HTTP exception handling
1 parent ea861f1 commit b34b275

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

openfga_sdk/rest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ async def handle_response_exception(
278278
if 200 <= response.status <= 299:
279279
return
280280

281+
if isinstance(response, aiohttp.ClientResponse):
282+
response.data = await response.read()
283+
281284
match response.status:
282285
case 400:
283286
raise ValidationException(http_resp=response)

0 commit comments

Comments
 (0)