# RecaptchaEnterprise Framework Reference

# RecaptchaError

    @interface RecaptchaError : NSError

Error class for reCAPTCHA Events.
- `


  ### [errorMessage](https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Classes/RecaptchaError#/c:objc(cs)RecaptchaError(py)errorMessage)


  ` Human readable error message.

  #### Declaration

  Swift

      var errorMessage: String? { get set }

  Objective-C

      @property (nonatomic, nullable) NSString *errorMessage;

- `


  ### [errorCode](https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Classes/RecaptchaError#/c:objc(cs)RecaptchaError(py)errorCode)


  ` Code relative to the error that was thrown. It maps to `https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Enums/RecaptchaErrorCode.html`.

  #### Declaration

  Swift

      var errorCode: Int { get set }

  Objective-C

      @property (nonatomic) NSInteger errorCode;

- `


  ### [-initWithDomain:code:userInfo:message:](https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Classes/RecaptchaError#/c:objc(cs)RecaptchaError(im)initWithDomain:code:userInfo:message:)


  ` Builds a new reCAPTCHA Error object.

  #### Declaration

  Swift

      init(domain: String, code: https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Enums/RecaptchaErrorCode.html, userInfo dict: [String : Any]? = nil, message: String?)

  Objective-C

      - (nonnull instancetype)
          initWithDomain:(nonnull NSErrorDomain)domain
                    code:(https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Enums/RecaptchaErrorCode.html)code
                userInfo:(NSDictionary<NSErrorUserInfoKey, id> *_Nullable)dict
                 message:(NSString *_Nullable)message;

- `


  ### [-init](https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Classes/RecaptchaError#/c:objc(cs)RecaptchaError(im)init)


  ` Unavailable
  Undocumented

  #### Declaration

  Objective-C

      - (instancetype)init NS_UNAVAILABLE;

- `


  ### [-description](https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Classes/RecaptchaError#/c:objc(cs)RecaptchaError(im)description)


  ` For debug purposes, prints a human-friendly description of the error.

  #### Declaration

  Swift

      func description() -> String

  Objective-C

      - (nonnull NSString *)description;

[## Deprecated APIs and properties.](https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Classes/RecaptchaError#/Deprecated-APIs-and-properties.)

- `


  ### [workflowAbortedTokenKey](https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Classes/RecaptchaError#/c:objc(cs)RecaptchaError(cpy)workflowAbortedTokenKey)


  ` Deprecated

  This property is not used on \> 18.X.X versions of the SDK.
  If the returned error code is of type `Aborted` you can use this key to
  get the aborted token out of the `userInfo` property. The token is stored
  inside an instance of `https://docs.cloud.google.com/recaptcha/docs/reference/ios/client/api/Classes/RecaptchaToken.html`.

  #### Declaration

  Swift

      class var workflowAbortedTokenKey: String { get }

  Objective-C

      @property (class, nonatomic, readonly) NSString *_Nonnull workflowAbortedTokenKey;