From b73b3512f3fc8e034c1ba4130d54755e589a0719 Mon Sep 17 00:00:00 2001 From: codytseng Date: Wed, 24 Sep 2025 10:08:49 +0800 Subject: [PATCH] fix: ignore close reasons from nostr-tools --- src/components/NoteList/index.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/NoteList/index.tsx b/src/components/NoteList/index.tsx index ffcaada..c23e17c 100644 --- a/src/components/NoteList/index.tsx +++ b/src/components/NoteList/index.tsx @@ -190,7 +190,19 @@ const NoteList = forwardRef( }, onClose: (url, reason) => { if (!showRelayCloseReason) return - if (reason === 'closed by caller') return + // ignore reasons from nostr-tools + if ( + [ + 'closed by caller', + 'relay connection errored', + 'relay connection closed', + 'pingpong timed out', + 'relay connection closed by us' + ].includes(reason) + ) { + return + } + toast.error(`${url}: ${reason}`) } },