@yousolution/node-red-contrib-you-sap-service-layer 0.2.5 → 0.2.7
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/CHANGELOG.md +8 -0
- package/nodes/manageErrors.js +3 -1
- package/nodes/serviceSap.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
# [0.2.7] - 2025-01-22
|
|
6
|
+
|
|
7
|
+
- Change Manage Error ServiceLayer on ServiceSAP Node
|
|
8
|
+
|
|
9
|
+
# [0.2.6] - 2025-01-18
|
|
10
|
+
|
|
11
|
+
- Change Manage Empty Respose on ServiceSAP node
|
|
12
|
+
|
|
5
13
|
# [0.2.5] - 2025-01-16
|
|
6
14
|
|
|
7
15
|
- Bug Fix NextLink Node on Manage Url Value
|
package/nodes/manageErrors.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
function VerifyErrorSL (node, msg, response, consentEmpty=false) {
|
|
3
3
|
if (!response.hasOwnProperty("success") && !response.hasOwnProperty("error") && !Object.keys(response).length && !consentEmpty) { // Error Generic
|
|
4
|
+
|
|
4
5
|
msg.payload = response;
|
|
5
6
|
node.error('Not Valid Requests', msg)
|
|
6
7
|
node.status({ fill: 'red', shape: 'dot', text: 'Not Valid Requests' });
|
|
@@ -25,8 +26,9 @@ function VerifyErrorSL (node, msg, response, consentEmpty=false) {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
}
|
|
28
|
-
else { // OK Response
|
|
29
|
+
else { // OK Response
|
|
29
30
|
return response;
|
|
31
|
+
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
|
package/nodes/serviceSap.js
CHANGED
|
@@ -19,9 +19,9 @@ module.exports = function (RED) {
|
|
|
19
19
|
const options = { method: 'POST', hasRawQuery: false, isService: true, data: data };
|
|
20
20
|
const login = Support.login;
|
|
21
21
|
const result = await Support.sendRequest({ node, msg, config, axios, login, options });
|
|
22
|
-
msg.payload = VerifyErrorSL(node, msg, result.data);//result.data;
|
|
22
|
+
msg.payload = VerifyErrorSL(node, msg, result.data, true);//result.data;
|
|
23
23
|
msg.statusCode = result.status;
|
|
24
|
-
if(
|
|
24
|
+
if(result.status < 299) {
|
|
25
25
|
node.status({ fill: 'green', shape: 'dot', text: 'success' });
|
|
26
26
|
node.send(msg);
|
|
27
27
|
}
|