lib/two_captcha/errors.rb in two_captcha-1.2.0 vs lib/two_captcha/errors.rb in two_captcha-1.3.0
- old
+ new
@@ -96,10 +96,16 @@
def initialize
super('The captcha was not solved in the expected time')
end
end
+ class GoogleKey < Error
+ def initialize
+ super('Missing googlekey parameter')
+ end
+ end
+
RESPONSE_ERRORS = {
'ERROR_WRONG_USER_KEY' => TwoCaptcha::WrongUserKey,
'ERROR_KEY_DOES_NOT_EXIST' => TwoCaptcha::InvalidUserKey,
'ERROR_ZERO_BALANCE' => TwoCaptcha::ZeroBalance,
'ERROR_NO_SLOT_AVAILABLE' => TwoCaptcha::NoSlotAvailable,
@@ -109,8 +115,9 @@
'ERROR_IMAGE_TYPE_NOT_SUPPORTED' => TwoCaptcha::ImageNotSupported,
'ERROR_IP_NOT_ALLOWED' => TwoCaptcha::IpNotAllowed,
'IP_BANNED' => TwoCaptcha::IpBanned,
'ERROR_WRONG_ID_FORMAT' => TwoCaptcha::WrongIdFormat,
'ERROR_CAPTCHA_UNSOLVABLE' => TwoCaptcha::CaptchaUnsolvable,
- 'ERROR_EMPTY_ACTION' => TwoCaptcha::EmptyAction
+ 'ERROR_EMPTY_ACTION' => TwoCaptcha::EmptyAction,
+ 'ERROR_GOOGLEKEY' => TwoCaptcha::GoogleKey
}
end