Skip to content

Commit 3b41c98

Browse files
committed
style
1 parent ff7fafa commit 3b41c98

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/core/src/amazonqFeatureDev/controllers/chat/controller.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,11 @@ export class FeatureDevController {
514514
break
515515
}
516516

517-
await session.sendMetricDataTelemetry(MetricDataOperationName.EndCodeGeneration, result, err.stack)
517+
await session.sendMetricDataTelemetry(
518+
MetricDataOperationName.EndCodeGeneration,
519+
result,
520+
'stack trace: ' + (err.stack ?? '')
521+
)
518522
throw err
519523
} finally {
520524
// Finish processing the event

packages/core/src/test/amazonqFeatureDev/controllers/chat/controller.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,7 @@ describe('Controller', () => {
525525
sendMetricDataTelemetrySpy.calledWith(
526526
MetricDataOperationName.EndCodeGeneration,
527527
metricResult,
528-
529-
// Stack trace should include the name of the test framework
530-
sinon.match((str) => typeof str === 'string' && str.includes('Mocha'))
528+
sinon.match((str) => typeof str === 'string' && str.includes('stack trace: '))
531529
)
532530
)
533531
}

0 commit comments

Comments
 (0)