@cumulus/errors 10.1.2 → 11.1.1
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 +11 -1
- package/dist/index.js +3 -2
- package/package.json +2 -2
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:
|
|
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
|
|
@@ -327,5 +330,12 @@ export declare const IndexExistsError: {
|
|
|
327
330
|
stack?: string | undefined;
|
|
328
331
|
};
|
|
329
332
|
};
|
|
333
|
+
export declare const UnmetRequirementsError: {
|
|
334
|
+
new (message: string): {
|
|
335
|
+
name: string;
|
|
336
|
+
message: string;
|
|
337
|
+
stack?: string | undefined;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
330
340
|
export {};
|
|
331
341
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IndexExistsError = exports.PostgresUpdateFailed = exports.PostgresValidationError = exports.GranuleNotPublished = exports.RecordAlreadyMigrated = exports.MissingRequiredEnvVarError = exports.ValidationError = exports.UnparsableFileLocationError = exports.UnmatchedRegexError = exports.UnexpectedFileSize = exports.RecordDoesNotExist = exports.PDRParsingError = exports.MissingRequiredEnvVar = exports.MissingRequiredArgument = exports.MismatchPdrCollection = exports.InvalidRegexError = exports.InvalidChecksum = exports.InvalidArgument = exports.HostNotFound = exports.ApiCollisionError = exports.FTPError = exports.FileNotFound = exports.EcsStartTaskError = exports.DuplicateFile = exports.DeletePublishedGranule = exports.CumulusMessageError = exports.ConnectionTimeout = exports.ProviderNotFound = exports.MissingBucketMap = exports.CMRInternalError = exports.CMRMetaFileNotFound = exports.XmlMetaFileNotFound = exports.RemoteResourceError = exports.ResourcesLockedError = exports.IncompleteError = exports.NotNeededError = exports.WorkflowError = exports.isConditionalCheckException = exports.isWorkflowError = exports.isThrottlingException = exports.ThrottlingException = exports.createErrorType = void 0;
|
|
3
|
+
exports.UnmetRequirementsError = exports.IndexExistsError = exports.PostgresUpdateFailed = exports.PostgresValidationError = exports.GranuleNotPublished = exports.RecordAlreadyMigrated = exports.MissingRequiredEnvVarError = exports.ValidationError = exports.UnparsableFileLocationError = exports.UnmatchedRegexError = exports.UnexpectedFileSize = exports.RecordDoesNotExist = exports.PDRParsingError = exports.MissingRequiredEnvVar = exports.MissingRequiredArgument = exports.MismatchPdrCollection = exports.InvalidRegexError = exports.InvalidChecksum = exports.InvalidArgument = exports.HostNotFound = exports.ApiCollisionError = exports.FTPError = exports.FileNotFound = exports.EcsStartTaskError = exports.DuplicateFile = exports.DeletePublishedGranule = exports.CumulusMessageError = exports.ConnectionTimeout = exports.ProviderNotFound = exports.MissingBucketMap = exports.CMRInternalError = exports.CMRMetaFileNotFound = exports.XmlMetaFileNotFound = exports.RemoteResourceError = exports.ResourcesLockedError = exports.IncompleteError = exports.NotNeededError = exports.WorkflowError = exports.isConditionalCheckException = exports.isWorkflowError = exports.isThrottlingException = exports.ThrottlingException = exports.createErrorType = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Creates a new error type with the given name and parent class. Sets up
|
|
6
6
|
* boilerplate necessary to successfully subclass Error and preserve stack trace
|
|
@@ -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.
|
|
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
|
|
@@ -119,4 +119,5 @@ class PostgresValidationError extends exports.ValidationError {
|
|
|
119
119
|
exports.PostgresValidationError = PostgresValidationError;
|
|
120
120
|
exports.PostgresUpdateFailed = (0, exports.createErrorType)('PostgresUpdateFailed');
|
|
121
121
|
exports.IndexExistsError = (0, exports.createErrorType)('IndexExistsError');
|
|
122
|
+
exports.UnmetRequirementsError = (0, exports.createErrorType)('UnmetRequirementsError');
|
|
122
123
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cumulus/errors",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.1.1",
|
|
4
4
|
"description": "Provides error classes for Cumulus",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"GIBS",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
},
|
|
34
34
|
"author": "Cumulus Authors",
|
|
35
35
|
"license": "Apache-2.0",
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "07fe682da23821434372759fb1948b081da429b5"
|
|
37
37
|
}
|