Skip to content

Commit

Permalink
improved DataNotFoundError invocation on line 43
Browse files Browse the repository at this point in the history
  • Loading branch information
hitblast committed Dec 10, 2023
1 parent d532e5b commit e46221b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mcsrvstat/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async def _perform_req(endpoint: str) -> Union[Any, bytes]:
async with aiohttp.ClientSession() as session:
async with session.get(endpoint) as request:
if request.status != 200:
raise DataNotFoundError('Request status not OK (failed).')
raise DataNotFoundError(f'{request.status} (request failed).')
elif request.headers['Content-Type'] == 'image/png':
return await request.read()
else:
Expand Down

0 comments on commit e46221b

Please sign in to comment.