node-consul-service 1.0.39 → 1.0.41
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/index.cjs.js +5 -6
- package/dist/index.esm.js +5 -6
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19414,14 +19414,10 @@ async function callService(serviceName, options = {}) {
|
|
|
19414
19414
|
headers,
|
|
19415
19415
|
params,
|
|
19416
19416
|
});
|
|
19417
|
-
return
|
|
19418
|
-
success: true,
|
|
19419
|
-
data: response.data,
|
|
19420
|
-
status: response.status,
|
|
19421
|
-
};
|
|
19417
|
+
return response;
|
|
19422
19418
|
}
|
|
19423
19419
|
catch (error) {
|
|
19424
|
-
|
|
19420
|
+
return {
|
|
19425
19421
|
success: false,
|
|
19426
19422
|
message: error.message,
|
|
19427
19423
|
status: (_a = error.response) === null || _a === void 0 ? void 0 : _a.status,
|
|
@@ -19514,6 +19510,9 @@ async function dataLink(data, schema) {
|
|
|
19514
19510
|
}
|
|
19515
19511
|
}
|
|
19516
19512
|
}
|
|
19513
|
+
if (!(response === null || response === void 0 ? void 0 : response.success)) {
|
|
19514
|
+
throw new DataLinkError(service, path, response);
|
|
19515
|
+
}
|
|
19517
19516
|
}
|
|
19518
19517
|
catch (error) {
|
|
19519
19518
|
throw new DataLinkError(service, path, error);
|
package/dist/index.esm.js
CHANGED
|
@@ -19412,14 +19412,10 @@ async function callService(serviceName, options = {}) {
|
|
|
19412
19412
|
headers,
|
|
19413
19413
|
params,
|
|
19414
19414
|
});
|
|
19415
|
-
return
|
|
19416
|
-
success: true,
|
|
19417
|
-
data: response.data,
|
|
19418
|
-
status: response.status,
|
|
19419
|
-
};
|
|
19415
|
+
return response;
|
|
19420
19416
|
}
|
|
19421
19417
|
catch (error) {
|
|
19422
|
-
|
|
19418
|
+
return {
|
|
19423
19419
|
success: false,
|
|
19424
19420
|
message: error.message,
|
|
19425
19421
|
status: (_a = error.response) === null || _a === void 0 ? void 0 : _a.status,
|
|
@@ -19512,6 +19508,9 @@ async function dataLink(data, schema) {
|
|
|
19512
19508
|
}
|
|
19513
19509
|
}
|
|
19514
19510
|
}
|
|
19511
|
+
if (!(response === null || response === void 0 ? void 0 : response.success)) {
|
|
19512
|
+
throw new DataLinkError(service, path, response);
|
|
19513
|
+
}
|
|
19515
19514
|
}
|
|
19516
19515
|
catch (error) {
|
|
19517
19516
|
throw new DataLinkError(service, path, error);
|