Skip to content

Commit

Permalink
add raise_for_status as httpx doesn't have this configuration in clie…
Browse files Browse the repository at this point in the history
…nt level
  • Loading branch information
omer9564 committed May 30, 2024
1 parent c898bda commit 61ea66b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ async def _fetch_(self):
self._session, self._event.config.method
)
if self._event.config.data is not None:
result = await http_method(
result: Union[ClientResponse, httpx.Response] = await http_method(
self._url, data=self._event.config.data, **self._ssl_context_kwargs
)
else:
result = await http_method(self._url, **self._ssl_context_kwargs)
result.raise_for_status()
return result

@staticmethod
Expand Down

0 comments on commit 61ea66b

Please sign in to comment.