@sap-ux/axios-extension
Advanced tools
Comparing version 0.9.2 to 0.9.3
@@ -15,2 +15,3 @@ "use strict"; | ||
const odata_service_1 = require("../../base/odata-service"); | ||
const odata_request_error_1 = require("../../base/odata-request-error"); | ||
const V2_CLASSIC_ENTITYSET = 'ServiceCollection'; | ||
@@ -65,3 +66,8 @@ const V2_RECOMMENDED_ENTITYSET = 'RecommendedServiceCollection'; | ||
const response = yield this.get(`/${this.entitySet}`, { params }); | ||
return this.mapServices(response.odata()); | ||
const data = response.odata(); | ||
// check if the service responded with an odata error | ||
if (odata_request_error_1.ODataRequestError.containsError(data)) { | ||
throw new odata_request_error_1.ODataRequestError(data); | ||
} | ||
return this.mapServices(data); | ||
}); | ||
@@ -68,0 +74,0 @@ } |
@@ -15,2 +15,3 @@ "use strict"; | ||
const odata_service_1 = require("../../base/odata-service"); | ||
const odata_request_error_1 = require("../../base/odata-request-error"); | ||
const V4_RECOMMENDED_ENTITYSET = 'RecommendedServices'; | ||
@@ -75,2 +76,6 @@ const V4_CLASSIC_ENTITYSET = 'Services'; | ||
} | ||
// check if the service responded with an odata error | ||
if (odata_request_error_1.ODataRequestError.containsError(serviceGroups)) { | ||
throw new odata_request_error_1.ODataRequestError(serviceGroups); | ||
} | ||
return this.mapServices(serviceGroups, this.entitySet); | ||
@@ -77,0 +82,0 @@ }); |
{ | ||
"name": "@sap-ux/axios-extension", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"description": "Extension of the Axios module adding convinience methods to interact with SAP systems especially with OData services.", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180317
73
4022