https://www.dbt.se/_hcms/api/associate/company/contact called through AJAX in our hubspot website. One of our test cases is to add an invalid email to make the API fail and send an error message which it did.
When we check it printed out this response:
{"error":"A server error occurred: 2020-10-01T16:39:07.319Z\tERROR\tUnhandled Promise Rejection \t{\"errorType\":\"Runtime.UnhandledPromiseRejection\",\"errorMessage\":\"ReferenceError: dataCompany is not defined\",\"reason\":{\"errorType\":\"ReferenceError\",\"errorMessage\":\"dataCompany is not defined\",\"stack\":[\"ReferenceError: dataCompany is not defined\",\" at /var/task/test.js:51:101\",\" at processTicksAndRejections (internal/process/task_queues.js:97:5)\"]},\"promise\":{},\"stack\":[\"Runtime.UnhandledPromiseRejection: ReferenceError: dataCompany is not defined\",\" at process.<anonymous> (/var/runtime/index.js:35:15)\",\" at process.emit (events.js:315:20)\",\" at processPromiseRejections (internal/process/promises.js:209:33)\",\" at processTicksAndRejections (internal/process/task_queues.js:98:32)\"]}\n\nMemory: 17/128 MB\nRuntime: 861.70 ms"}
Question is this something Hubspot explicitly threw or is it something we did to print this all out? If we did, then how can this be hidden? Our audit team pointed this out and just wondering if this is something we can remove since it spits out the whole stack trace.