From 26b5f9958b2636672cc590e2f16b752d8e83b8bb Mon Sep 17 00:00:00 2001 From: majdyz Date: Wed, 15 Apr 2026 20:03:26 +0700 Subject: [PATCH] fix(frontend): add .catch to clipboard writeText in LogsTable exec ID cell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unhandled promise rejections can occur if clipboard API fails (permissions or browser restrictions). Silently swallow the error — admin table copy is best-effort and the truncated ID is still visible in the cell. --- .../admin/platform-costs/components/LogsTable.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autogpt_platform/frontend/src/app/(platform)/admin/platform-costs/components/LogsTable.tsx b/autogpt_platform/frontend/src/app/(platform)/admin/platform-costs/components/LogsTable.tsx index 1377dd0403..3d8af1d61d 100644 --- a/autogpt_platform/frontend/src/app/(platform)/admin/platform-costs/components/LogsTable.tsx +++ b/autogpt_platform/frontend/src/app/(platform)/admin/platform-costs/components/LogsTable.tsx @@ -128,10 +128,11 @@ function LogsTable({ } onClick={ log.graph_exec_id - ? () => - navigator.clipboard.writeText( - String(log.graph_exec_id), - ) + ? () => { + navigator.clipboard + .writeText(String(log.graph_exec_id)) + .catch(() => {}); + } : undefined } >