From a0527da351d3d31d58eb001ae28938734e1b9b6c Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 23:11:25 +0000 Subject: [PATCH 1/2] fix(sentry): Filter NotAllowedError from clipboard copy exceptions --- src/components/agentSetupCallout/index.tsx | 4 +++- src/components/copyPromptButton/index.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/agentSetupCallout/index.tsx b/src/components/agentSetupCallout/index.tsx index 0c6145be52cab7..3791f3f9133aee 100644 --- a/src/components/agentSetupCallout/index.tsx +++ b/src/components/agentSetupCallout/index.tsx @@ -41,7 +41,9 @@ export function AgentSetupCallout({skill, platformName}: Props) { DocMetrics.copyAIPrompt(window.location.pathname, skill, true); setTimeout(() => setCopied(false), 1500); } catch (error) { - Sentry.captureException(error); + if ((error as Error)?.name !== 'NotAllowedError') { + Sentry.captureException(error); + } DocMetrics.copyAIPrompt(window.location.pathname, skill, false); setCopied(false); } diff --git a/src/components/copyPromptButton/index.tsx b/src/components/copyPromptButton/index.tsx index ab9775a6319167..a87bccdfecd951 100644 --- a/src/components/copyPromptButton/index.tsx +++ b/src/components/copyPromptButton/index.tsx @@ -75,7 +75,9 @@ export function CopyPromptButton({skill, platformName}: Props) { DocMetrics.copyAIPrompt(window.location.pathname, skill, true, 'inline_link'); setTimeout(() => setCopied(false), 1500); } catch (error) { - Sentry.captureException(error); + if ((error as Error)?.name !== 'NotAllowedError') { + Sentry.captureException(error); + } DocMetrics.copyAIPrompt(window.location.pathname, skill, false, 'inline_link'); setCopied(false); } From cdb583fa289e4d97ab59f0e0a13b1cc0837d3f28 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2026 21:48:11 +0000 Subject: [PATCH 2/2] fix(sentry): Prevent NotAllowedError from spamming Sentry for clipboard operations --- src/components/agentSetupCallout/index.tsx | 7 ++++--- src/components/copyPromptButton/index.tsx | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/agentSetupCallout/index.tsx b/src/components/agentSetupCallout/index.tsx index 3791f3f9133aee..0b0129ef80e50c 100644 --- a/src/components/agentSetupCallout/index.tsx +++ b/src/components/agentSetupCallout/index.tsx @@ -41,9 +41,10 @@ export function AgentSetupCallout({skill, platformName}: Props) { DocMetrics.copyAIPrompt(window.location.pathname, skill, true); setTimeout(() => setCopied(false), 1500); } catch (error) { - if ((error as Error)?.name !== 'NotAllowedError') { - Sentry.captureException(error); - } + Sentry.logger.warn('clipboard.writeText failed', { + error: (error as Error)?.message, + errorName: (error as Error)?.name, + }); DocMetrics.copyAIPrompt(window.location.pathname, skill, false); setCopied(false); } diff --git a/src/components/copyPromptButton/index.tsx b/src/components/copyPromptButton/index.tsx index a87bccdfecd951..97543dc6cd6ea6 100644 --- a/src/components/copyPromptButton/index.tsx +++ b/src/components/copyPromptButton/index.tsx @@ -75,9 +75,10 @@ export function CopyPromptButton({skill, platformName}: Props) { DocMetrics.copyAIPrompt(window.location.pathname, skill, true, 'inline_link'); setTimeout(() => setCopied(false), 1500); } catch (error) { - if ((error as Error)?.name !== 'NotAllowedError') { - Sentry.captureException(error); - } + Sentry.logger.warn('clipboard.writeText failed', { + error: (error as Error)?.message, + errorName: (error as Error)?.name, + }); DocMetrics.copyAIPrompt(window.location.pathname, skill, false, 'inline_link'); setCopied(false); }