apify-client 3.0.0-beta.61 → 3.0.0-beta.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apify_api_error.d.ts +2 -1
- package/dist/apify_api_error.js +2 -1
- package/dist/apify_client_error.d.ts +10 -0
- package/dist/apify_client_error.js +10 -0
- package/dist/bundle.js +11 -11
- package/dist/bundle.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/invalid_response_body_error.d.ts +2 -1
- package/dist/invalid_response_body_error.js +2 -1
- package/dist/resource_clients/dataset.d.ts +29 -0
- package/dist/resource_clients/dataset.js +47 -0
- package/dist/response_validation_error.d.ts +2 -1
- package/dist/response_validation_error.js +2 -1
- package/dist/utils.d.ts +0 -13
- package/dist/utils.js +7 -13
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { LiteralUnion } from 'type-fest';
|
|
2
|
+
import { ApifyClientError } from './apify_client_error.js';
|
|
2
3
|
import type { ApifyResponse } from './http_clients/base.js';
|
|
3
4
|
import type { ErrorType } from './models.js';
|
|
4
5
|
export type { ErrorType } from './models.js';
|
|
@@ -16,7 +17,7 @@ export type { ErrorType } from './models.js';
|
|
|
16
17
|
* subclass extends `ApifyApiError`, so `instanceof ApifyApiError` matches all of them. Errors that
|
|
17
18
|
* share a status code are told apart by their `type`.
|
|
18
19
|
*/
|
|
19
|
-
export declare class ApifyApiError extends
|
|
20
|
+
export declare class ApifyApiError extends ApifyClientError {
|
|
20
21
|
#private;
|
|
21
22
|
name: string;
|
|
22
23
|
/**
|
package/dist/apify_api_error.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApifyClientError } from './apify_client_error.js';
|
|
1
2
|
import { isBuffer } from './utils.js';
|
|
2
3
|
/**
|
|
3
4
|
* Examples of capturing groups for "...at ActorCollectionClient.listResources (/Users/..."
|
|
@@ -30,7 +31,7 @@ const CLIENT_METHOD_REGEX = /at( async)? (?![A-Za-z]*HttpClient\.)([A-Za-z]+(Col
|
|
|
30
31
|
* subclass extends `ApifyApiError`, so `instanceof ApifyApiError` matches all of them. Errors that
|
|
31
32
|
* share a status code are told apart by their `type`.
|
|
32
33
|
*/
|
|
33
|
-
export class ApifyApiError extends
|
|
34
|
+
export class ApifyApiError extends ApifyClientError {
|
|
34
35
|
name;
|
|
35
36
|
/**
|
|
36
37
|
* The resource client and the method parsed from the stack trace, such as `ActorClient.getResource`. A public
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class of the errors the client throws for a failed API call: {@link ApifyApiError} and its subclasses,
|
|
3
|
+
* {@link InvalidResponseBodyError} and {@link ResponseValidationError}. A single `instanceof ApifyClientError`
|
|
4
|
+
* check catches all of them.
|
|
5
|
+
*
|
|
6
|
+
* Invalid arguments throw an `ArgumentValidationError` before any request is sent, and transport errors, timeouts
|
|
7
|
+
* and aborts surface as the errors the transport raised. None of those extend this class.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ApifyClientError extends Error {
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class of the errors the client throws for a failed API call: {@link ApifyApiError} and its subclasses,
|
|
3
|
+
* {@link InvalidResponseBodyError} and {@link ResponseValidationError}. A single `instanceof ApifyClientError`
|
|
4
|
+
* check catches all of them.
|
|
5
|
+
*
|
|
6
|
+
* Invalid arguments throw an `ArgumentValidationError` before any request is sent, and transport errors, timeouts
|
|
7
|
+
* and aborts surface as the errors the transport raised. None of those extend this class.
|
|
8
|
+
*/
|
|
9
|
+
export class ApifyClientError extends Error {
|
|
10
|
+
}
|