-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Comparable
public enum HCaptchaError implements Serializable
Enum with all possible hCaptcha errors. It contains both errors related to the android sdk instance and js client errors. More info about js client errors here: https://docs.hcaptcha.com/configuration#error-codes
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ERRORGeneric error for unknown situations - should never happen.
INSECURE_HTTP_REQUEST_ERRORInsecure HTTP request intercepted
INVALID_CUSTOM_THEMEInvalid custom theme
RATE_LIMITEDRate limited due to too many tries.
CHALLENGE_CLOSEDUser closed the challenge by pressing `back` button or touching the outside of the dialog.
TOKEN_TIMEOUThCaptcha token expired
SESSION_TIMEOUThCaptcha challenge expired
INTERNAL_ERRORUser may need to select the checkbox or if invisible programmatically call execute toinitiate the challenge again.
CHALLENGE_ERRORUser may need to select the checkbox or if invisible programmatically call execute toinitiate the challenge again.
INVALID_DATAInvalid data is not accepted by endpoints.
NETWORK_ERRORInternet connection is missing.Make sure AndroidManifest requires internet permission:
{@code {@literal <}uses-permission android:name="android.permission.INTERNET" /{@literal >}}
-
Method Summary
Modifier and Type Method Description StringtoString()static HCaptchaErrorfromId(int errorId)Finds the enum based on the integer encoding static Array<HCaptchaError>values()static HCaptchaErrorvalueOf(String name)intgetErrorId()StringgetMessage()-
-
Method Detail
-
fromId
@NonNull() static HCaptchaError fromId(int errorId)
Finds the enum based on the integer encoding
- Parameters:
errorId- the integer encoding
-
values
static Array<HCaptchaError> values()
-
valueOf
static HCaptchaError valueOf(String name)
-
getErrorId
int getErrorId()
-
getMessage
String getMessage()
-
-
-
-