From 3307f310241a11811288f70c756fded3b9ec2951 Mon Sep 17 00:00:00 2001 From: Edmond Chui <1967998+EdmondChuiHW@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:02:17 +0100 Subject: [PATCH] add error instance to unhandled error perf metrics (#78) --- front_end/core/host/RNPerfMetrics.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/front_end/core/host/RNPerfMetrics.ts b/front_end/core/host/RNPerfMetrics.ts index 835340fa8a5..408b7d05319 100644 --- a/front_end/core/host/RNPerfMetrics.ts +++ b/front_end/core/host/RNPerfMetrics.ts @@ -76,6 +76,7 @@ class RNPerfMetrics { params: { type: 'error', message: event.message, + error: event.error instanceof Error ? event.error : null, } }); }, {passive: true}); @@ -92,6 +93,7 @@ class RNPerfMetrics { params: { type: 'rejectedPromise', message, + error: event.reason instanceof Error ? event.reason : null, } }); }, {passive: true}); @@ -206,6 +208,7 @@ export type UnhandledErrorEvent = Readonly<{ params: Readonly<{ type: 'error' | 'rejectedPromise', message: string, + error: Error | null | undefined, }>, }>;