diff --git a/core/computed/metrics/lantern-first-contentful-paint.js b/core/computed/metrics/lantern-first-contentful-paint.js index f3b441c2183e..947f786696cd 100644 --- a/core/computed/metrics/lantern-first-contentful-paint.js +++ b/core/computed/metrics/lantern-first-contentful-paint.js @@ -16,8 +16,11 @@ class LanternFirstContentfulPaint extends Lantern.Metrics.FirstContentfulPaint { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + try { + return this.compute(await getComputationDataParams(data, context), extras); + } catch (err) { + lanternErrorAdapter(err); + } } /** diff --git a/core/computed/metrics/lantern-interactive.js b/core/computed/metrics/lantern-interactive.js index 51abaa9edbc0..2205bfa5c718 100644 --- a/core/computed/metrics/lantern-interactive.js +++ b/core/computed/metrics/lantern-interactive.js @@ -17,8 +17,11 @@ class LanternInteractive extends Lantern.Metrics.Interactive { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + try { + return this.compute(await getComputationDataParams(data, context), extras); + } catch (err) { + lanternErrorAdapter(err); + } } /** diff --git a/core/computed/metrics/lantern-largest-contentful-paint.js b/core/computed/metrics/lantern-largest-contentful-paint.js index 77c26c2e3b35..d45ca4065691 100644 --- a/core/computed/metrics/lantern-largest-contentful-paint.js +++ b/core/computed/metrics/lantern-largest-contentful-paint.js @@ -17,8 +17,11 @@ class LanternLargestContentfulPaint extends Lantern.Metrics.LargestContentfulPai * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + try { + return this.compute(await getComputationDataParams(data, context), extras); + } catch (err) { + lanternErrorAdapter(err); + } } /** diff --git a/core/computed/metrics/lantern-max-potential-fid.js b/core/computed/metrics/lantern-max-potential-fid.js index 3d9580420406..acfa0589c6db 100644 --- a/core/computed/metrics/lantern-max-potential-fid.js +++ b/core/computed/metrics/lantern-max-potential-fid.js @@ -17,8 +17,11 @@ class LanternMaxPotentialFID extends Lantern.Metrics.MaxPotentialFID { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + try { + return this.compute(await getComputationDataParams(data, context), extras); + } catch (err) { + lanternErrorAdapter(err); + } } /** diff --git a/core/computed/metrics/lantern-speed-index.js b/core/computed/metrics/lantern-speed-index.js index 9197fb93cd6c..0c85e7c2ef47 100644 --- a/core/computed/metrics/lantern-speed-index.js +++ b/core/computed/metrics/lantern-speed-index.js @@ -18,8 +18,11 @@ class LanternSpeedIndex extends Lantern.Metrics.SpeedIndex { * @return {Promise} */ static async computeMetricWithGraphs(data, context, extras) { - return this.compute(await getComputationDataParams(data, context), extras) - .catch(lanternErrorAdapter); + try { + return this.compute(await getComputationDataParams(data, context), extras); + } catch (err) { + lanternErrorAdapter(err); + } } /** diff --git a/package.json b/package.json index 3a5d10560888..7522eae367b7 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ "webtreemap-cdt": "^3.2.1" }, "dependencies": { - "@paulirish/trace_engine": "0.0.28", + "@paulirish/trace_engine": "0.0.30", "@sentry/node": "^6.17.4", "axe-core": "^4.9.1", "chrome-launcher": "^1.1.2", diff --git a/types/artifacts.d.ts b/types/artifacts.d.ts index 1dd3faddb62d..6e0efd6cacc2 100644 --- a/types/artifacts.d.ts +++ b/types/artifacts.d.ts @@ -511,7 +511,7 @@ declare module Artifacts { interface TraceEngineResult { data: TraceEngine.Handlers.Types.TraceParseData; - insights: TraceEngine.Insights.Types.TraceInsightData; + insights: TraceEngine.Insights.Types.TraceInsightData; } interface TraceEngineRootCauses { diff --git a/yarn.lock b/yarn.lock index a8964ae4b3c7..7ec957e1f714 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1080,10 +1080,10 @@ "@nodelib/fs.scandir" "2.1.3" fastq "^1.6.0" -"@paulirish/trace_engine@0.0.28": - version "0.0.28" - resolved "https://registry.yarnpkg.com/@paulirish/trace_engine/-/trace_engine-0.0.28.tgz#9c7163c68fc697a3c39638248aa8f143eb188927" - integrity sha512-hxeqhny/jggy3y3yEUE/91UQmNREjoebaYlggWNTtX1ZFdIXJ4ea8MSMlO+dc1oWcnKHGQzdU3+Mhl01ZEuU0w== +"@paulirish/trace_engine@0.0.30": + version "0.0.30" + resolved "https://registry.yarnpkg.com/@paulirish/trace_engine/-/trace_engine-0.0.30.tgz#89b84129c6b66a5582873c1062f4414e2d81b930" + integrity sha512-26Kr4gA2EGV6zq5kaQawy7jah6ih3XN2bDQti5/HTdFhIetbbDVgwxVnH0hCMe0vD1yMk5SCCQyka3e0cR7GhA== "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2"