@aravinthan_p/appnest-app-sdk-utils 1.0.10 → 1.0.12

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.
@@ -120,15 +120,10 @@ const httpAPIWrapper = async ({ apiPayload }) => {
120
120
  requestBody
121
121
  });
122
122
  console.log(`$http - httpAPIWrapper - response: status ${response?.status} data ${response?.data} `);
123
- return { data: response?.data?.body, status: response?.data?.statusCodeValue };
123
+ return { data: response?.data, status: response?.status };
124
124
  } catch (error) {
125
- const res = error.response;
126
- if(res){
127
- return { data: res.data.responseBody, status: res.data.status };
128
- } else {
129
- console.error("$http - httpAPIWrapper - error:", error.message);
130
- throw error;
131
- }
125
+ console.error("$http - httpAPIWrapper - error:", error.message);
126
+ throw error;
132
127
  }
133
128
  };
134
129
  const $http = {
@@ -56,7 +56,7 @@ const makeSparrowAppAPICall = async ({
56
56
  console.log(`${C.dim}$AxiosWrapper │ 📥 status${C.reset}:`, response?.status, response?.statusText);
57
57
  console.log(`${C.dim}$AxiosWrapper │ 📥 traceid${C.reset}:`, response?.headers['traceid']);
58
58
  console.log(`${C.dim}$AxiosWrapper │ 📥 executionid${C.reset}:`, response?.headers['executionid']);
59
- console.log(`${C.dim}$AxiosWrapper │ 📥 response body ${C.reset}:`, JSON.stringify(response?.data?.body));
59
+ console.log(`${C.dim}$AxiosWrapper │ 📥 response body ${C.reset}:`, JSON.stringify(response?.data));
60
60
  return response;
61
61
  } catch (error) {
62
62
  const res = error.response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aravinthan_p/appnest-app-sdk-utils",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.2.1",