mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Raise exception on unhandled responses
This commit is contained in:
parent
f42dc376bf
commit
11ad173e81
1 changed files with 4 additions and 1 deletions
|
@ -14,3 +14,6 @@ async def get_player_data(platform: str, region: str, battletag: str, **kwargs):
|
||||||
return r.json()
|
return r.json()
|
||||||
elif r.status_code == 404:
|
elif r.status_code == 404:
|
||||||
raise Exception("Player not found.")
|
raise Exception("Player not found.")
|
||||||
|
else:
|
||||||
|
raise Exception("Unhandled API response.")
|
||||||
|
|
Loading…
Reference in a new issue