Skip to content

Commit aa8aff4

Browse files
committed
check for a frame with any name
1 parent 8985ac3 commit aa8aff4

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

test/crashtracker/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@ app.post('/telemetry/proxy/api/v2/apmtelemetry', (req, res) => {
2626

2727
server.close(() => {
2828
const stackTrace = JSON.parse(req.body.payload[0].stack_trace)
29-
const killFrame = stackTrace.find(frame => frame.names[0]?.name.includes('_uv_kill'))
29+
const namedFrame = stackTrace.find(frame => frame.names[0]?.name)
3030

31-
for (const frame of stackTrace) {
32-
console.log(frame)
33-
}
34-
35-
if (!killFrame) {
36-
throw new Error('Could not find a stack frame for the crashing function.')
31+
if (!namedFrame) {
32+
throw new Error('Could not find a stack frame with a valid symbol mapping.')
3733
}
3834
})
3935
})

0 commit comments

Comments
 (0)