Skip to content

Commit 2030ddd

Browse files
committed
Show more detailed error on RGL API 500 codes
1 parent ad27874 commit 2030ddd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rglapi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ async def get_player(self, steam_id: int):
104104
) as player_data:
105105
if player_data.status == 429:
106106
raise RateLimitException("Rate limited by the RGL API")
107+
if player_data.status == 500:
108+
raise LookupError(
109+
"RGL API is currently down. Please try again later."
110+
)
107111
if player_data.status != 200:
108112
raise LookupError("Player does not exist in RGL")
109113
return await player_data.json()

0 commit comments

Comments
 (0)