@smithy/util-waiter 4.0.0 → 4.0.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-cjs/index.js +3 -3
- package/dist-es/utils/validate.js +3 -3
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -131,11 +131,11 @@ var createMessageFromResponse = /* @__PURE__ */ __name((reason) => {
|
|
|
131
131
|
|
|
132
132
|
// src/utils/validate.ts
|
|
133
133
|
var validateWaiterOptions = /* @__PURE__ */ __name((options) => {
|
|
134
|
-
if (options.maxWaitTime
|
|
134
|
+
if (options.maxWaitTime <= 0) {
|
|
135
135
|
throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);
|
|
136
|
-
} else if (options.minDelay
|
|
136
|
+
} else if (options.minDelay <= 0) {
|
|
137
137
|
throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);
|
|
138
|
-
} else if (options.maxDelay
|
|
138
|
+
} else if (options.maxDelay <= 0) {
|
|
139
139
|
throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);
|
|
140
140
|
} else if (options.maxWaitTime <= options.minDelay) {
|
|
141
141
|
throw new Error(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export const validateWaiterOptions = (options) => {
|
|
2
|
-
if (options.maxWaitTime
|
|
2
|
+
if (options.maxWaitTime <= 0) {
|
|
3
3
|
throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);
|
|
4
4
|
}
|
|
5
|
-
else if (options.minDelay
|
|
5
|
+
else if (options.minDelay <= 0) {
|
|
6
6
|
throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);
|
|
7
7
|
}
|
|
8
|
-
else if (options.maxDelay
|
|
8
|
+
else if (options.maxDelay <= 0) {
|
|
9
9
|
throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);
|
|
10
10
|
}
|
|
11
11
|
else if (options.maxWaitTime <= options.minDelay) {
|