🐛 Change 5003 error to InvalidDevice

This commit is contained in:
xtaodada 2023-11-18 23:40:07 +08:00
parent c2b391f3b5
commit 720e7c5832
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -216,6 +216,13 @@ class RedemptionClaimed(RedemptionException):
message = "Redemption code has been claimed already."
class InvalidDevice(BadRequest):
"""Device is invalid."""
ret_code = 5003
message = "Device id and fp are invalid."
_TBR = Type[BadRequest]
_errors: Dict[int, Union[_TBR, str, Tuple[_TBR, Optional[str]]]] = {
# misc hoyolab
@ -264,7 +271,7 @@ _errors: Dict[int, Union[_TBR, str, Tuple[_TBR, Optional[str]]]] = {
1008: AccountNotFound,
-1104: "This action must be done in the app.",
1034: NeedChallenge,
5003: NeedChallenge,
5003: InvalidDevice,
}
ERRORS: Dict[int, Tuple[_TBR, Optional[str]]] = {