diff --git a/lib/telemetry.js b/lib/telemetry.js index 1758051c..57ffaeb1 100644 --- a/lib/telemetry.js +++ b/lib/telemetry.js @@ -34,9 +34,13 @@ const unactionableErrors = setInterval(() => { writeClient.flush().catch(err => { - if (!unactionableErrors.test(String(err))) { - Sentry.captureException(err) + if (unactionableErrors.test(String(err))) { + return } + if (typeof err?.code === 'string' && unactionableErrors.test(err.code)) { + return + } + Sentry.captureException(err) }) }, 5_000).unref()