You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/structs/2captcha.ts
+2-2
Original file line number
Diff line number
Diff line change
@@ -825,7 +825,7 @@ export class Solver {
825
825
*
826
826
* [Read more about "Amazon WAF" captcha](https://2captcha.com/2captcha-api#amazon-waf).
827
827
*
828
-
* @param {{ pageurl, sitekey, iv, context, pingback, proxy, proxytype}} params The `amazonWaf` method takes arguments as an object. Thus, the `pageurl`, `sitekey`, `iv`, `context` fields in the passed object are mandatory. [Open example](https://github.com/dzmitry-duboyski/2captcha-ts/blob/master/tests/amazonWaf.js)
828
+
* @param {{ pageurl, sitekey, iv, context, pingback, proxy, proxytype}} params The `amazonWaf` method takes arguments as an object. Thus, the `pageurl`, `sitekey`, `iv`, `context` fields in the passed object are mandatory.
829
829
* @param {string} params.pageurl Is the full `URL` of page where you were challenged by the captcha.
830
830
* @param {string} params.sitekey Is a value of `key` parameter in the page source.
831
831
* @param {string} params.iv Is a value of `iv` parameter in the page source.
@@ -879,7 +879,7 @@ export class Solver {
879
879
*
880
880
* [Read more about Cloudflare Turnstile captcha](https://2captcha.com/2captcha-api#turnstile).
881
881
*
882
-
* @param {{ pageurl, sitekey, action, data, pingback, proxy, proxytype}} params The `сloudflareTurnstile` method takes arguments as an object. Thus, the `pageurl`, `sitekey` fields in the passed object are mandatory. [Open example](https://github.com/dzmitry-duboyski/2captcha-ts/blob/master/tests/turnstile.js)
882
+
* @param {{ pageurl, sitekey, action, data, pingback, proxy, proxytype}} params The `сloudflareTurnstile` method takes arguments as an object. Thus, the `pageurl`, `sitekey` fields in the passed object are mandatory.
883
883
* @param {string} params.pageurl Full `URL` of the page where you see the captcha.
884
884
* @param {string} params.sitekey Is a value of `sitekey` parameter in the page source.
885
885
* @param {string} params.action Value of optional `action` parameter you found on page.
Copy file name to clipboardExpand all lines: src/structs/2captchaError.ts
+4-4
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ export class APIError extends Error {
58
58
};break;
59
59
case"ERROR_UPLOAD": {
60
60
this.code=14
61
-
this.message="The Solve Request was malformed. Please make sure the image is valid. If it is, please open up a github issue detailing this event. https://github.com/dzmitry-duboyski/2captcha-ts"
61
+
this.message="The Solve Request was malformed. Please make sure the image is valid. If it is, please open up a github issue detailing this event."
62
62
};break;
63
63
case"ERROR_IP_NOT_ALLOWED": {
64
64
this.code=15
@@ -94,7 +94,7 @@ export class APIError extends Error {
94
94
};break;
95
95
case"ERROR_BAD_PARAMETERS": {
96
96
this.code=23
97
-
this.message="Some parameters are missing in this request. If you're using a pre-provided function, please open up an issue on the GitHub (https://github.com/dzmitry-duboyski/2captcha-ts)"
97
+
this.message="Some parameters are missing in this request. If you're using a pre-provided function, please open up an issue on the GitHub"
98
98
};break;
99
99
case"ERROR_BAD_PROXY": {
100
100
this.code=24
@@ -108,7 +108,7 @@ export class APIError extends Error {
108
108
// Start for Res.php errors
109
109
case"CAPCHA_NOT_READY": {
110
110
this.code=25
111
-
this.message="The captcha is not solved yet. If you see this error, Please open up an issue on the GitHub (https://github.com/dzmitry-duboyski/2captcha-ts)"
111
+
this.message="The captcha is not solved yet. If you see this error, Please open up an issue on the GitHub"
112
112
};break;
113
113
case"ERROR_WRONG_ID_FORMAT": {
114
114
this.code=26
@@ -140,7 +140,7 @@ export class APIError extends Error {
140
140
};break;
141
141
case"ERROR_EMPTY_ACTION": {
142
142
this.code=33
143
-
this.message="The ACtion parameter is missing. Please open an issue in the GitHub (https://github.com/dzmitry-duboyski/2captcha-ts)"
143
+
this.message="The ACtion parameter is missing. Please open an issue in the GitHub"
thrownewError(`Error when check params captcha.\nNot found "${fieldName}" field in the Object. Field "${fieldName}" is required for "${method}" method. Please add field "${fieldName}" in object and try again.\nPlease correct your code for the "${method}" method according to the code examples on page https://www.npmjs.com/package/2captcha-ts`)
108
+
thrownewError(`Error when check params captcha.\nNot found "${fieldName}" field in the Object. Field "${fieldName}" is required for "${method}" method. Please add field "${fieldName}" in object and try again.\nPlease correct your code for the "${method}" method according to the code examples`)
thrownewError(`Error when check params captcha.\nNot found "textinstructions" or "imginstructions" field in the Object. One of this field is required for "bounding_box" method. Please add field "textinstructions" or "imginstructions" in object and try again.\nPlease correct your code for the "bounding_box" method according to the code examples on page https://www.npmjs.com/package/2captcha-ts`)
119
+
thrownewError(`Error when check params captcha.\nNot found "textinstructions" or "imginstructions" field in the Object. One of this field is required for "bounding_box" method. Please add field "textinstructions" or "imginstructions" in object and try again.\nPlease correct your code for the "bounding_box" method according to the code examples`)
0 commit comments