sst 2.1.34 → 2.1.35
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/credentials.js +16 -9
- package/package.json +1 -1
- package/sst.mjs +14 -7
package/credentials.js
CHANGED
|
@@ -66,17 +66,24 @@ export function useAWSClient(client, force = false) {
|
|
|
66
66
|
region: project.config.region,
|
|
67
67
|
credentials: credentials,
|
|
68
68
|
retryStrategy: new StandardRetryStrategy(async () => 10000, {
|
|
69
|
-
retryDecider: (
|
|
70
|
-
// Handle
|
|
71
|
-
if (
|
|
72
|
-
return false;
|
|
73
|
-
if (err.message === "Could not load credentials from any providers")
|
|
74
|
-
return false;
|
|
75
|
-
// Handle no internet connection
|
|
76
|
-
if (err.code === "ENOTFOUND") {
|
|
69
|
+
retryDecider: (e) => {
|
|
70
|
+
// Handle no internet connection => retry
|
|
71
|
+
if (e.code === "ENOTFOUND") {
|
|
77
72
|
printNoInternet();
|
|
78
73
|
}
|
|
79
|
-
|
|
74
|
+
// Handle throttling errors => retry
|
|
75
|
+
if ([
|
|
76
|
+
"ThrottlingException",
|
|
77
|
+
"Throttling",
|
|
78
|
+
"TooManyRequestsException",
|
|
79
|
+
"OperationAbortedException",
|
|
80
|
+
"TimeoutError",
|
|
81
|
+
"NetworkingError",
|
|
82
|
+
].includes(e.name)) {
|
|
83
|
+
Logger.debug("Retry AWS call", e.name, e.message);
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
80
87
|
},
|
|
81
88
|
delayDecider: (_, attempts) => {
|
|
82
89
|
return Math.min(1.5 ** attempts * 100, 5000);
|
package/package.json
CHANGED
package/sst.mjs
CHANGED
|
@@ -1619,15 +1619,22 @@ function useAWSClient(client, force = false) {
|
|
|
1619
1619
|
region: project.config.region,
|
|
1620
1620
|
credentials,
|
|
1621
1621
|
retryStrategy: new StandardRetryStrategy(async () => 1e4, {
|
|
1622
|
-
retryDecider: (
|
|
1623
|
-
if (
|
|
1624
|
-
return false;
|
|
1625
|
-
if (err.message === "Could not load credentials from any providers")
|
|
1626
|
-
return false;
|
|
1627
|
-
if (err.code === "ENOTFOUND") {
|
|
1622
|
+
retryDecider: (e) => {
|
|
1623
|
+
if (e.code === "ENOTFOUND") {
|
|
1628
1624
|
printNoInternet();
|
|
1629
1625
|
}
|
|
1630
|
-
|
|
1626
|
+
if ([
|
|
1627
|
+
"ThrottlingException",
|
|
1628
|
+
"Throttling",
|
|
1629
|
+
"TooManyRequestsException",
|
|
1630
|
+
"OperationAbortedException",
|
|
1631
|
+
"TimeoutError",
|
|
1632
|
+
"NetworkingError"
|
|
1633
|
+
].includes(e.name)) {
|
|
1634
|
+
Logger.debug("Retry AWS call", e.name, e.message);
|
|
1635
|
+
return true;
|
|
1636
|
+
}
|
|
1637
|
+
return false;
|
|
1631
1638
|
},
|
|
1632
1639
|
delayDecider: (_, attempts) => {
|
|
1633
1640
|
return Math.min(1.5 ** attempts * 100, 5e3);
|