Skip to content

Commit d702800

Browse files
committed
chore: remove isStillProcessingError
reason: it's now part of Throttling Errors list
1 parent 3801f3e commit d702800

File tree

4 files changed

+4
-47
lines changed

4 files changed

+4
-47
lines changed

packages/middleware-retry/src/retryDecider.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { RETRYABLE_STATUS_CODES } from "./constants";
22
import {
33
isClockSkewError,
4-
isStillProcessingError,
54
isThrottlingError
65
} from "@aws-sdk/service-error-classification";
76
import { MetadataBearer, SdkError } from "@aws-sdk/types";
@@ -23,11 +22,7 @@ export const defaultRetryDecider = (error: SdkError) => {
2322
return true;
2423
}
2524

26-
return (
27-
isStillProcessingError(error) ||
28-
isThrottlingError(error) ||
29-
isClockSkewError(error)
30-
);
25+
return isThrottlingError(error) || isClockSkewError(error);
3126
};
3227

3328
function hasMetadata(error: any): error is MetadataBearer {

packages/service-error-classification/src/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ export const CLOCK_SKEW_ERROR_CODES = [
1414
"SignatureDoesNotMatch"
1515
];
1616

17-
/**
18-
* Errors encountered when the state presumed by an operation is not yet ready.
19-
*/
20-
export const STILL_PROCESSING_ERROR_CODES = ["PriorRequestNotComplete"];
21-
2217
/**
2318
* Errors that indicate the SDK is being throttled.
2419
*

packages/service-error-classification/src/index.spec.ts

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
import {
2-
CLOCK_SKEW_ERROR_CODES,
3-
STILL_PROCESSING_ERROR_CODES,
4-
THROTTLING_ERROR_CODES
5-
} from "./constants";
6-
import {
7-
isClockSkewError,
8-
isStillProcessingError,
9-
isThrottlingError
10-
} from "./index";
1+
import { CLOCK_SKEW_ERROR_CODES, THROTTLING_ERROR_CODES } from "./constants";
2+
import { isClockSkewError, isThrottlingError } from "./index";
113

124
const checkForErrorType = (
135
isErrorTypeFunc: (error: Error) => boolean,
@@ -37,24 +29,6 @@ describe("isClockSkewError", () => {
3729
}
3830
});
3931

40-
describe("isStillProcessingError", () => {
41-
STILL_PROCESSING_ERROR_CODES.forEach(name => {
42-
it(`should declare error with the name "${name}" to be a StillProcessing error`, () => {
43-
checkForErrorType(isStillProcessingError, name, true);
44-
});
45-
});
46-
47-
while (true) {
48-
const name = Math.random().toString(36).substring(2);
49-
if (!STILL_PROCESSING_ERROR_CODES.includes(name)) {
50-
it(`should not declare error with the name "${name}" to be a StillProcessing error`, () => {
51-
checkForErrorType(isStillProcessingError, name, false);
52-
});
53-
break;
54-
}
55-
}
56-
});
57-
5832
describe("isThrottlingError", () => {
5933
THROTTLING_ERROR_CODES.forEach(name => {
6034
it(`should declare error with the name "${name}" to be a Throttling error`, () => {
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
import {
2-
CLOCK_SKEW_ERROR_CODES,
3-
STILL_PROCESSING_ERROR_CODES,
4-
THROTTLING_ERROR_CODES
5-
} from "./constants";
1+
import { CLOCK_SKEW_ERROR_CODES, THROTTLING_ERROR_CODES } from "./constants";
62

73
export const isClockSkewError = (error: Error) =>
84
CLOCK_SKEW_ERROR_CODES.includes(error.name);
95

10-
export const isStillProcessingError = (error: Error) =>
11-
STILL_PROCESSING_ERROR_CODES.includes(error.name);
12-
136
export const isThrottlingError = (error: Error) =>
147
THROTTLING_ERROR_CODES.includes(error.name);

0 commit comments

Comments
 (0)