captcha-capmonster-0.1.0.0: A package for integrating a variety of captcha solving services.
Copyright(c) 2022 Edward Yang
LicenseMIT
Safe HaskellNone
LanguageHaskell2010

Captcha.CapMonster.Internal.Error

Description

This module is for internal-use and does not follow pvp versioning policies.

Synopsis

Documentation

data CapMonsterError Source #

All possible errors when solving a captcha using CapMonster.

Constructors

CapMonsterResponseError CapMonsterErrorCode

An error returned by the CapMonster API.

UnknownResponseError Text Text

An error returned by the CapMonster API that does not exist as a CapMonsterErrorCode yet.

This error holds the error code, followed by its description.

UnknownError Text

An unknown error occurred. Check the message for more details.

This should never occur. Please report this issue on github if this happens to you.

NetworkError HttpException

An error when sending the http request.

TimeoutError

The captcha took to long to solve and was timed out.

data CapMonsterErrorCode Source #

An error code returned by the CapMonster API.

Constructors

KeyDoesNotExist

The provided API key does not exist.

ZeroCaptchaFileSize

The size of the captcha must be 100 bytes or larger.

TooBigFileSize

The size of the captcha must be less than 50,000 bytes.

ZeroBalance

Your CapMonster balance is empty.

IpNotAllowed

Requests from your current API key is not allowed from your ip.

CaptchaUnsolvable

The captcha cannot be solved. Perhaps it's a corrupted image, or contains too much noise?

InvalidCaptchaId

The captcha id does not exist. Is the captcha older than 5 minutes?

CaptchaNotReady

The captcha has not been solved yet.

IpBanned

You have sent too many requests with an incorrect API key. Try again later.

NoSuchMethod

The requested method does not exist. You should not ever have to see this error as a user. If this is ever seen, please open an issue: https://github.com/qwbarch/captcha-haskell/issues

TooManyRequests

You are being rate limited. Try not to request the result of a captcha more than 1 time per 2 seconds.

DomainNotAllowed

The specified domain cannot be solved by CapMonster.

NoSlotAvailable

The captcha could not be solved due to no available captcha workers.

Instances

Instances details
Bounded CapMonsterErrorCode Source # 
Instance details

Defined in Captcha.CapMonster.Internal.Error

Enum CapMonsterErrorCode Source # 
Instance details

Defined in Captcha.CapMonster.Internal.Error

Eq CapMonsterErrorCode Source # 
Instance details

Defined in Captcha.CapMonster.Internal.Error

Ord CapMonsterErrorCode Source # 
Instance details

Defined in Captcha.CapMonster.Internal.Error

Show CapMonsterErrorCode Source # 
Instance details

Defined in Captcha.CapMonster.Internal.Error

errorCode :: CapMonsterErrorCode -> Text Source #

Textual representation of a CapMonsterErrorCode.

parseError :: Text -> Maybe CapMonsterErrorCode Source #

Parse an error code into its equivalent CapMonsterErrorCode.