Skip to content

Commit d97d488

Browse files
yoshiya0503dependabot[bot]louis70109
authored
fix aiohttp error handling (#364)
* fix aiohttp error handling * fix coegen * fix codedgen of async/await error handling and json response * Bump black from 21.10b0 to 21.12b0 (#365) Bumps [black](https://github.com/psf/black) from 21.10b0 to 21.12b0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: RST document format error (#357) * fix: rst format * fix aiohttp error handling * fix conflict * fix codedgen of async/await error handling and json response * add async_api some test * add exeptions test case Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: NiJia Lin <nijia.lin@linecorp.com>
1 parent e48ce64 commit d97d488

File tree

6 files changed

+170
-50
lines changed

6 files changed

+170
-50
lines changed

linebot/aiohttp_async_http_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ async def content(self):
147147
return await self.response.content.read()
148148

149149
@property
150-
def json(self):
150+
async def json(self):
151151
"""Get response body as json-decoded."""
152-
return self.response.json()
152+
return await self.response.json()
153153

154154
def iter_content(self, chunk_size=1024):
155155
"""Get response body as iterator content (stream).

0 commit comments

Comments
 (0)