@cumulus/errors 11.0.0 → 12.0.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,6 +24,9 @@ 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
+ }
27
30
  /**
28
31
  * Test to see if a given exception is an AWS Throttling Exception
29
32
  */
@@ -35,7 +38,7 @@ export declare const isWorkflowError: (error: Error) => boolean;
35
38
  /**
36
39
  * Returns true if the error is a DynamoDB conditional check exception.
37
40
  */
38
- export declare const isConditionalCheckException: (error: ErrorWithOptionalCode) => boolean;
41
+ export declare const isConditionalCheckException: (error: ErrorWithName) => boolean;
39
42
  /**
40
43
  * WorkflowError should be bubbled out to the overall workflow in the 'exception' field, rather than
41
44
  * being thrown and causting an immediate failure
package/dist/index.js CHANGED
@@ -38,7 +38,7 @@ exports.isWorkflowError = isWorkflowError;
38
38
  /**
39
39
  * Returns true if the error is a DynamoDB conditional check exception.
40
40
  */
41
- const isConditionalCheckException = (error) => error.code === 'ConditionalCheckFailedException';
41
+ const isConditionalCheckException = (error) => error.name === 'ConditionalCheckFailedException';
42
42
  exports.isConditionalCheckException = isConditionalCheckException;
43
43
  /**
44
44
  * WorkflowError should be bubbled out to the overall workflow in the 'exception' field, rather than
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cumulus/errors",
3
- "version": "11.0.0",
3
+ "version": "12.0.0",
4
4
  "description": "Provides error classes for Cumulus",
5
5
  "keywords": [
6
6
  "GIBS",
@@ -8,7 +8,7 @@
8
8
  "NASA"
9
9
  ],
10
10
  "engines": {
11
- "node": ">=12.18.0"
11
+ "node": ">=14.19.1"
12
12
  },
13
13
  "main": "dist/index.js",
14
14
  "types": "dist/index.d.ts",
@@ -33,5 +33,5 @@
33
33
  },
34
34
  "author": "Cumulus Authors",
35
35
  "license": "Apache-2.0",
36
- "gitHead": "e922ad12fd94affa6cd60a97a184a465a756c50b"
36
+ "gitHead": "2d84198510f37d64444715736b8b08360f61c766"
37
37
  }