Skip to content

Commit

Permalink
fix: Catch aiohttp instead of requests exceptions in async client
Browse files Browse the repository at this point in the history
  • Loading branch information
cetteup committed Aug 18, 2024
1 parent 7da4dc7 commit 7c81663
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aspxstats/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from urllib.parse import urljoin

import aiohttp as aiohttp
import requests as requests

from .client import AspxClient
from .exceptions import ClientError
Expand Down Expand Up @@ -47,5 +46,5 @@ async def get_aspx_data(self, endpoint: str, params: Optional[Dict[str, Optional
return await response.text(errors='replace')
else:
raise ClientError(f'Failed to fetch ASPX data (HTTP/{response.status})')
except requests.RequestException as e:
except aiohttp.ClientError as e:
raise ClientError(f'Failed to fetch ASPX data: {e}')

0 comments on commit 7c81663

Please sign in to comment.