@cumulus/errors 19.0.0 → 19.2.0-alpha.0

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/index.d.ts CHANGED
@@ -24,11 +24,8 @@ export declare class ThrottlingException extends Error {
24
24
  export interface ErrorWithOptionalCode extends Error {
25
25
  code?: string;
26
26
  }
27
- export interface ErrorWithName extends Error {
28
- name: string;
29
- }
30
27
  /**
31
- * Test to see if a given exception is an AWS Throttling Exception
28
+ * Test to see if a given exception is a Throttling Exception.
32
29
  */
33
30
  export declare const isThrottlingException: (err: ErrorWithOptionalCode) => boolean;
34
31
  /**
@@ -38,7 +35,7 @@ export declare const isWorkflowError: (error: Error) => boolean;
38
35
  /**
39
36
  * Returns true if the error is a DynamoDB conditional check exception.
40
37
  */
41
- export declare const isConditionalCheckException: (error: ErrorWithName) => boolean;
38
+ export declare const isConditionalCheckException: (error: any) => boolean;
42
39
  /**
43
40
  * WorkflowError should be bubbled out to the overall workflow in the 'exception' field, rather than
44
41
  * being thrown and causting an immediate failure
package/dist/index.js CHANGED
@@ -26,9 +26,9 @@ class ThrottlingException extends Error {
26
26
  }
27
27
  exports.ThrottlingException = ThrottlingException;
28
28
  /**
29
- * Test to see if a given exception is an AWS Throttling Exception
29
+ * Test to see if a given exception is a Throttling Exception.
30
30
  */
31
- const isThrottlingException = (err) => err.code === 'ThrottlingException';
31
+ const isThrottlingException = (err) => err.name === 'ThrottlingException' || err.code === 'ThrottlingException';
32
32
  exports.isThrottlingException = isThrottlingException;
33
33
  /**
34
34
  * Returns true if the error is a resource error.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/errors",
3
- "version": "19.0.0",
3
+ "version": "19.2.0-alpha.0",
4
4
  "description": "Provides error classes for Cumulus",
5
5
  "keywords": [
6
6
  "GIBS",
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "author": "Cumulus Authors",
34
34
  "license": "Apache-2.0",
35
- "gitHead": "3a619db6e6fa20846eb75802e89d5a065fd62fcc"
35
+ "gitHead": "533280b62564b6ce89fabcde5cbe653afb964205"
36
36
  }