@miso.ai/server-sdk 0.6.5-beta.10 → 0.6.5-beta.12
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/package.json +2 -2
- package/src/axios.js +8 -4
- package/src/version.js +1 -1
package/package.json
CHANGED
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"simonpai <simon.pai@askmiso.com>"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@miso.ai/server-commons": "0.6.5-beta.
|
|
19
|
+
"@miso.ai/server-commons": "0.6.5-beta.12",
|
|
20
20
|
"axios": "^1.6.2",
|
|
21
21
|
"axios-retry": "^4.5.0",
|
|
22
22
|
"dotenv": "^16.0.1",
|
|
23
23
|
"split2": "^4.1.0",
|
|
24
24
|
"yargs": "^17.5.1"
|
|
25
25
|
},
|
|
26
|
-
"version": "0.6.5-beta.
|
|
26
|
+
"version": "0.6.5-beta.12"
|
|
27
27
|
}
|
package/src/axios.js
CHANGED
|
@@ -3,11 +3,15 @@ import axiosRetry from 'axios-retry';
|
|
|
3
3
|
import version from './version.js';
|
|
4
4
|
|
|
5
5
|
const DEFAULT_RETRY_OPTIONS = {
|
|
6
|
-
retries:
|
|
7
|
-
retryDelay: count => count *
|
|
6
|
+
retries: 5,
|
|
7
|
+
retryDelay: count => count * 500,
|
|
8
8
|
retryCondition: (error) => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
if (!error.response) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
const { status } = error.response;
|
|
13
|
+
// Only retry on 5xx or 429 server errors
|
|
14
|
+
return (status >= 500 && status < 600) || status === 429;
|
|
11
15
|
},
|
|
12
16
|
};
|
|
13
17
|
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '0.6.5-beta.
|
|
1
|
+
export default '0.6.5-beta.12';
|