@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 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
@@ -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
 
@@ -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(msg.payload) {
24
+ if(result.status < 299) {
25
25
  node.status({ fill: 'green', shape: 'dot', text: 'success' });
26
26
  node.send(msg);
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yousolution/node-red-contrib-you-sap-service-layer",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Unofficial module SAP Service Layer for NODE-RED",
5
5
  "license": "MIT",
6
6
  "scripts": {