Skip to content

Commit

Permalink
Use same handle_error method for async
Browse files Browse the repository at this point in the history
  • Loading branch information
foarsitter committed Oct 22, 2023
1 parent c8b2f30 commit a37a43b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/requestmodel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ async def asend(self, client: AsyncClient) -> ResponseType:
"""Send the request asynchronously"""
r = self.as_request(client)
response = await client.send(r)
self.handle_error(response)
return self.response_model.model_validate(response.json())


Expand Down

0 comments on commit a37a43b

Please sign in to comment.