polyapi 0.24.12 → 0.24.14

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.
@@ -78,8 +78,8 @@ const executeApiFunction = (id, clientID, polyCustom, requestArgs) => {
78
78
  let responseData = data.data;
79
79
  try {
80
80
  responseData = JSON.stringify(data.data);
81
- } catch (err) {}
82
- scrub(requestArgs)
81
+ } catch (err) {
82
+ requestArgs = scrub(requestArgs)
83
83
  console.error('Error executing api function with id:', id, 'Status code:', data.status, 'Request data:', scrubbedArgs, 'Response data:', responseData);
84
84
  }
85
85
 
@@ -98,7 +98,7 @@ const executeApiFunction = (id, clientID, polyCustom, requestArgs) => {
98
98
  })
99
99
  }).then(({ headers, data, status }) => {
100
100
  if (status && (status < 200 || status >= 300) && process.env.LOGS_ENABLED) {
101
- scrub(requestArgs)
101
+ requestArgs = scrub(requestArgs)
102
102
  console.error('Error direct executing api function with id:', id, 'Status code:', status, 'Request data:', requestArgs, 'Response data:', data.data);
103
103
  }
104
104
  const apiExecutionTimeMs = Date.now() - requestApiStartTime;
@@ -130,7 +130,7 @@ const executeApiFunction = (id, clientID, polyCustom, requestArgs) => {
130
130
  try {
131
131
  responseData = JSON.stringify(data.data);
132
132
  } catch (err) {}
133
- scrub(requestArgs)
133
+ requestArgs = scrub(requestArgs)
134
134
  console.error('Error executing api function with id:', id, 'Status code:', data.status, 'Request data:', requestArgs, 'Response data:', responseData);
135
135
  }
136
136
  const serverExecutionTimeMs = Number(headers['x-poly-execution-duration']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polyapi",
3
- "version": "0.24.12",
3
+ "version": "0.24.14",
4
4
  "description": "Poly is a CLI tool to help create and manage your Poly definitions.",
5
5
  "license": "MIT",
6
6
  "repository": {