Errors
errors
Errors received from the API.
Classes:
-
AccountMuted–Account is muted.
-
AccountNotFound–Tried to get data with an invalid uid.
-
AlreadyClaimed–Already claimed the daily reward today.
-
AuthkeyException–Base error for authkeys.
-
AuthkeyTimeout–Authkey has timed out.
-
CookieException–Base error for cookies.
-
DailyGeetestTriggered–Geetest triggered during daily reward claim.
-
DataNotPublic–User hasn't set their data to public.
-
GeetestError–Geetest triggered during the battle chronicle API request.
-
GenshinException–A base genshin exception.
-
InvalidAuthkey–Authkey is not valid.
-
InvalidCookies–Cookies weren't valid.
-
RedemptionClaimed–Redemption code has been claimed already.
-
RedemptionCooldown–Redemption is on cooldown.
-
RedemptionException–Exception caused by redeeming a code.
-
RedemptionInvalid–Invalid redemption code.
-
TooManyRequests–Made too many requests and got ratelimited.
Functions:
-
check_for_geetest–Check if geetest was triggered during the request and raise an error if so.
-
raise_for_retcode–Raise an equivalent error to a response.
Attributes:
ERRORS
module-attribute
ERRORS: dict[int, tuple[_TGE, Optional[str]]] = {
retcode: (
(GenshinException, exc)
if isinstance(exc, str)
else exc
if isinstance(exc, tuple)
else (exc, None)
)
for (retcode, exc) in (items())
}
AccountDoesNotExist
AccountHasLocked
Account has logged incorrect over than 3 - 5 time(s). It's will be locked and wait 20 minute.
Attributes:
-
msg–
AccountLoginFail
AccountMuted
AccountNotFound
ActionInCooldown
Action is in cooldown.
AlreadyClaimed
AuthkeyException
Base error for authkeys.
AuthkeyTimeout
CookieException
Base error for cookies.
DailyGeetestTriggered
DataNotPublic
GeetestError
GeetestFailed
GenshinException
A base genshin exception.
Attributes:
IncorrectGameAccount
IncorrectGamePassword
InternalDatabaseError
InvalidAuthkey
InvalidCookies
NoNeedGeetest
No need to do geetest.
OTPRateLimited
RedeemGameLevelTooLow
Redemption code cannot be claimed because the game level is too low.
RedemptionClaimed
RedemptionCooldown
RedemptionException
Exception caused by redeeming a code.
RedemptionInvalid
RedemptionRegionLock
TooManyRequests
UserNotesAccessDenied
VerificationCodeRateLimited
VisitsTooFrequently
WrongOTP
check_for_geetest
Check if geetest was triggered during the request and raise an error if so.
raise_for_retcode
Raise an equivalent error to a response.
game record
10001 = invalid cookie 101xx = generic errors
authkey: -100 = invalid authkey -101 = authkey timed out code redemption: 20xx = invalid code or state -107x = invalid cookies daily reward: -500x = already claimed the daily reward