@@ -43,11 +43,23 @@ class InvalidInputResponseError(HCaptchaError):
43
43
pass
44
44
45
45
46
+ class ExpiredInputResponseError (HCaptchaError ):
47
+ pass
48
+
49
+
50
+ class AlreadySeenResponseError (HCaptchaError ):
51
+ pass
52
+
53
+
46
54
class BadRequestError (HCaptchaError ):
47
55
pass
48
56
49
57
50
- class InvalidOrAlreadySeenResponseError (HCaptchaError ):
58
+ class MissingRemoteIPError (HCaptchaError ):
59
+ pass
60
+
61
+
62
+ class InvalidRemoteIPError (HCaptchaError ):
51
63
pass
52
64
53
65
@@ -63,16 +75,25 @@ class UnexpectedError(HCaptchaError):
63
75
pass
64
76
65
77
78
+ class InvalidOrAlreadySeenResponseError (HCaptchaError ):
79
+ pass
80
+
81
+
66
82
# https://docs.hcaptcha.com/#siteverify-error-codes-table
67
83
ERROR_CODE_MAP = {
68
84
"missing-input-secret" : MissingInputSecretError ,
69
85
"invalid-input-secret" : InvalidInputSecretError ,
70
86
"missing-input-response" : MissingInputResponseError ,
71
87
"invalid-input-response" : InvalidInputResponseError ,
72
- "invalid-or-already-seen-response" : InvalidOrAlreadySeenResponseError ,
88
+ "expired-input-response" : ExpiredInputResponseError ,
89
+ "already-seen-response" : AlreadySeenResponseError ,
90
+ "bad-request" : BadRequestError ,
91
+ "missing-remoteip" : MissingRemoteIPError ,
92
+ "invalid-remoteip" : InvalidRemoteIPError ,
73
93
"not-using-dummy-passcode" : NotUsingDummyPasscodeError ,
74
94
"sitekey-secret-mismatch" : SitekeySecretMismatchError ,
75
- "bad-request" : BadRequestError ,
95
+ # Maybe legacy?
96
+ "invalid-or-already-seen-response" : InvalidOrAlreadySeenResponseError ,
76
97
}
77
98
78
99
0 commit comments