diff --git a/package.json b/package.json index 0e461be..14c99aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polyapi", - "version": "0.24.12", + "version": "0.24.13", "description": "Poly is a CLI tool to help create and manage your Poly definitions.", "license": "MIT", "repository": { diff --git a/templates/api-index.js b/templates/api-index.js index f67287d..64428a5 100644 --- a/templates/api-index.js +++ b/templates/api-index.js @@ -98,7 +98,7 @@ const executeApiFunction = (id, clientID, polyCustom, requestArgs) => { }) }).then(({ headers, data, status }) => { if (status && (status < 200 || status >= 300) && process.env.LOGS_ENABLED) { - scrub(requestArgs) + requestArgs = scrub(requestArgs) console.error('Error direct executing api function with id:', id, 'Status code:', status, 'Request data:', requestArgs, 'Response data:', data.data); } const apiExecutionTimeMs = Date.now() - requestApiStartTime; @@ -130,7 +130,7 @@ const executeApiFunction = (id, clientID, polyCustom, requestArgs) => { try { responseData = JSON.stringify(data.data); } catch (err) {} - scrub(requestArgs) + requestArgs = scrub(requestArgs) console.error('Error executing api function with id:', id, 'Status code:', data.status, 'Request data:', requestArgs, 'Response data:', responseData); } const serverExecutionTimeMs = Number(headers['x-poly-execution-duration']);