node-consul-service 1.0.55 → 1.0.57
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/consul/httpCaller.d.ts +1 -0
- package/dist/index.cjs.js +3 -2
- package/dist/index.esm.js +3 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19032,7 +19032,7 @@ const {
|
|
|
19032
19032
|
} = axios;
|
|
19033
19033
|
|
|
19034
19034
|
async function callService(serviceName, options = {}) {
|
|
19035
|
-
var _a, _b;
|
|
19035
|
+
var _a, _b, _c, _d;
|
|
19036
19036
|
const { method = 'GET', path = '/', data, headers, params, } = options;
|
|
19037
19037
|
try {
|
|
19038
19038
|
const instance = await getRandomServiceInstance(serviceName);
|
|
@@ -19051,7 +19051,8 @@ async function callService(serviceName, options = {}) {
|
|
|
19051
19051
|
success: false,
|
|
19052
19052
|
message: error.message,
|
|
19053
19053
|
status: (_a = error.response) === null || _a === void 0 ? void 0 : _a.status,
|
|
19054
|
-
|
|
19054
|
+
code: (_c = (_b = error.response) === null || _b === void 0 ? void 0 : _b.data.code) !== null && _c !== void 0 ? _c : "",
|
|
19055
|
+
data: (_d = error.response) === null || _d === void 0 ? void 0 : _d.data,
|
|
19055
19056
|
};
|
|
19056
19057
|
}
|
|
19057
19058
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -19030,7 +19030,7 @@ const {
|
|
|
19030
19030
|
} = axios;
|
|
19031
19031
|
|
|
19032
19032
|
async function callService(serviceName, options = {}) {
|
|
19033
|
-
var _a, _b;
|
|
19033
|
+
var _a, _b, _c, _d;
|
|
19034
19034
|
const { method = 'GET', path = '/', data, headers, params, } = options;
|
|
19035
19035
|
try {
|
|
19036
19036
|
const instance = await getRandomServiceInstance(serviceName);
|
|
@@ -19049,7 +19049,8 @@ async function callService(serviceName, options = {}) {
|
|
|
19049
19049
|
success: false,
|
|
19050
19050
|
message: error.message,
|
|
19051
19051
|
status: (_a = error.response) === null || _a === void 0 ? void 0 : _a.status,
|
|
19052
|
-
|
|
19052
|
+
code: (_c = (_b = error.response) === null || _b === void 0 ? void 0 : _b.data.code) !== null && _c !== void 0 ? _c : "",
|
|
19053
|
+
data: (_d = error.response) === null || _d === void 0 ? void 0 : _d.data,
|
|
19053
19054
|
};
|
|
19054
19055
|
}
|
|
19055
19056
|
}
|