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.
@@ -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 Error {
20
+ export declare class ApifyApiError extends ApifyClientError {
20
21
  #private;
21
22
  name: string;
22
23
  /**
@@ -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 Error {
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
+ }