You are here

public function HCaptcha::getErrorCodes in hCaptcha 8

1 call to HCaptcha::getErrorCodes()
HCaptcha::getResponseErrors in src/HCaptcha/HCaptcha.php

File

src/HCaptcha/HCaptcha.php, line 100

Class

HCaptcha

Namespace

Drupal\hcaptcha\HCaptcha

Code

public function getErrorCodes() {
  $error_codes = array(
    'missing-input-secret' => t('Your secret key is missing.'),
    'invalid-input-secret' => t('Your secret key is invalid or malformed.'),
    'missing-input-response' => t('The response parameter (verification token) is missing.'),
    'invalid-input-response' => t('The response parameter (verification token) is invalid or malformed.'),
    'bad-request' => t('The request is invalid or malformed.'),
    'bad-response' => t('Did not receive a 200 from the service.'),
    'connection-failed' => t('Could not connect to service.'),
    'unknown-error' => t('Not a success, but no error codes received.'),
  );
  return $error_codes;
}