From 5e18c5a0656b427e59890dc9c125164ef9f276c3 Mon Sep 17 00:00:00 2001 From: Connor Clark Date: Fri, 26 Jan 2024 12:37:52 -0800 Subject: [PATCH] misc: do not double report artifact dep error to sentry (#15777) --- core/gather/runner-helpers.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/gather/runner-helpers.js b/core/gather/runner-helpers.js index 4afd25c94ccd..b1beb860b4a3 100644 --- a/core/gather/runner-helpers.js +++ b/core/gather/runner-helpers.js @@ -33,7 +33,10 @@ import {Sentry} from '../lib/sentry.js'; * @param {Error} error */ function createDependencyError(dependency, error) { - return new Error(`Dependency "${dependency.id}" failed with exception: ${error.message}`); + const err = new Error(`Dependency "${dependency.id}" failed with exception: ${error.message}`); + // @ts-expect-error - We already reported the original error to Sentry, don't do it again. + err.expected = true; + return err; } /** @return {ArtifactState} */