diff --git a/src/utils/telemetry/report-error.ts b/src/utils/telemetry/report-error.ts index 81fc774de4f..c14b03ee1cc 100644 --- a/src/utils/telemetry/report-error.ts +++ b/src/utils/telemetry/report-error.ts @@ -25,10 +25,16 @@ export const reportError = async function (error, config = {}) { if (isCI) { return } - // convert a NotifiableError to an error class const err = error instanceof Error ? error : typeof error === 'string' ? new Error(error) : error + // `@netlify/config` tags intentional user-input errors (malformed netlify.toml, + // invalid redirects, etc.) with this shape. See @netlify/config/lib/error.js. + // These are not CLI bugs and don't belong in Bugsnag. + if (error?.customErrorInfo?.type === 'resolveConfig') { + return + } + const globalConfig = await getGlobalConfigStore() const options = JSON.stringify({