Skip to content

Commit d616772

Browse files
authored
lost my logging in code review, lets go agane (#6)
1 parent c1589f1 commit d616772

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "polyapi",
3-
"version": "0.23.14",
3+
"version": "0.23.15",
44
"description": "Poly is a CLI tool to help create and manage your Poly definitions.",
55
"license": "MIT",
66
"repository": {

templates/api-index.js.hbs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ module.exports = (clientID, polyCustom) => merge(
7575
).then(({ headers, data }) => {
7676
polyHeaders = headers;
7777
if (data && (data.status < 200 || data.status >= 300)) {
78-
console.error('Error getting direct execution data for api function with id:', id, 'Status code:', data.status, 'Request data:', requestArgs, 'Response data:', data.data);
78+
let responseData = data.data;
79+
try {
80+
responseData = JSON.stringify(data.data);
81+
} catch (err) {}
82+
console.error('Error executing api function with id:', id, 'Status code:', data.status, 'Request data:', requestArgs, 'Response data:', responseData);
7983
}
8084

8185
serverPreperationTimeMs = Number(polyHeaders['x-poly-execution-duration']);

0 commit comments

Comments
 (0)