mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-06-03 22:19:47 +08:00
👽️ 抛出一些错误
This commit is contained in:
parent
f6c7eb86a2
commit
3f6b926c33
@ -181,6 +181,12 @@ async def minigg_request(
|
||||
return retcode
|
||||
if req.status_code == 404:
|
||||
raise MiniggNotFoundError(**data)
|
||||
if req.status_code == 502:
|
||||
raise Exception('Minigg API is unavailable.')
|
||||
if req.status_code != 200:
|
||||
raise Exception(
|
||||
f'Minigg API is unavailable. (Error code: {req.status_code})'
|
||||
)
|
||||
return data
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user