Copyright | (c) 2022 Edward Yang |
---|---|
License | MIT |
Safe Haskell | None |
Language | Haskell2010 |
This module exports functions that follow the pvp versioning policies.
Synopsis
- data CapMonsterErrorCode
- data CapMonsterError
- data CapMonster
Documentation
data CapMonsterErrorCode Source #
An error code returned by the CapMonster API.
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
data CapMonsterError Source #
All possible errors when solving a captcha using CapMonster.
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 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. |
Instances
Show CapMonsterError Source # | |
Defined in Captcha.CapMonster.Internal.Error showsPrec :: Int -> CapMonsterError -> ShowS # show :: CapMonsterError -> String # showList :: [CapMonsterError] -> ShowS # | |
Exception CapMonsterError Source # | |
Defined in Captcha.CapMonster.Internal.Error |
data CapMonster Source #
Used for picking MonadCaptcha
instances for CapMonster.