Hello
When using atlassian-connect-express 7.4.5 the error sometimes appears: TypeError: Cannot read property 'stack' of undefined
at process. <anonymous> (/opt/app/node_modules/atlassian-connect-express/lib/index.js:36:44)
at processPromiseRejections (internal / process / promises.js: 245: 33)
npm ERR! errno 1
npm ERR! code ELIFECYCLE
npm ERR! teamlead-crm@1.0.0 start: `node -r esm app.js`
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! Exit status 1
npm ERR! Failed at the teamlead-crm@1.0.0 start script.
npm ERR!
npm ERR! /home/node/.npm/_logs/2021-09-06T08_06_50_275Z-debug.log
the intended code after which the error occurs
const getCompanyAutocomplete = new Promise((resolve, reject) => {
httpClient.get(`/rest/atlassian-connect/1/addons/${addonKey}/properties/tlCompanyAutocomplete`, (err, response, body) => {
try {
body = JSON.parse(body)
} catch (e) {
reject(undefined)
}
const companyAutocompleteSetting = body.value
if (companyAutocompleteSetting && companyAutocompleteSetting.value) {
resolve(companyAutocompleteSetting.value)
} else {
reject(undefined)
}
})
})
Tell me how you can handle this error?
Recommended Learning For You
Level up your skills with Atlassian learning
Reporting for DevOps
Identify four key DevOps metrics and learn how to use Jira reports to track your team's progress and performance.
Explore Atlassian Cloud products for agile and DevOps
Coordinate a suite of Atlassian Cloud products for greater collaboration and trust, higher-quality solutions, faster releases, and more.
Monitor component health with scorecards in Compass
Learn what scorecards are and their purpose in measuring the health of software components and improving DevOps practices.