1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Raise exception on unhandled responses

This commit is contained in:
Steffo 2016-08-12 21:12:51 +02:00
parent f42dc376bf
commit 11ad173e81

View file

@ -14,3 +14,6 @@ async def get_player_data(platform: str, region: str, battletag: str, **kwargs):
return r.json()
elif r.status_code == 404:
raise Exception("Player not found.")
else:
raise Exception("Unhandled API response.")