8000 Added axios retry · apisearch-io/javascript-client@d8b8a75 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Commit d8b8a75

Browse files
committed
Added axios retry
- Increased the timeout to 30s - Increased version 0.3.4
1 parent 27fec48 commit d8b8a75

File tree

10 files changed

+2837
-4709
lines changed

10 files changed

+2837
-4709
lines changed

dist/apisearch.js

Lines changed: 1312 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Apisearch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var Apisearch = /** @class */ (function () {
2626
*/
2727
Apisearch.createRepository = function (config) {
2828
Apisearch.ensureRepositoryConfigIsValid(config);
29-
config.options = tslib_1.__assign({ api_version: "v1", override_queries: true, timeout: 5000 }, config.options);
29+
config.options = tslib_1.__assign({ api_version: "v1", override_queries: true, timeout: 30000 }, config.options);
3030
/**
3131
* Client
3232
*/

lib/Http/AxiosClient.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ exports.__esModule = true;
33
exports.AxiosClient = void 0;
44
var tslib_1 = require("tslib");
55
var axios_1 = require("axios");
6+
var axios_retry_1 = require("axios-retry");
67
var __1 = require("..");
78
var Client_1 = require("./Client");
89
var Response_1 = require("./Response");
@@ -77,6 +78,7 @@ var AxiosClient = /** @class */ (function (_super) {
7778
_a.label = 1;
7879
case 1:
7980
_a.trys.push([1, 3, , 4]);
81+
axios_retry_1["default"](axios_1["default"], { retries: 3 });
8082
sendRequest = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
8183
switch (_a.label) {
8284
case 0: return [4 /*yield*/, axios_1["default"].request(axiosRequestConfig)];

0 commit comments

Comments
 (0)
0