fix: ignore close reasons from nostr-tools

This commit is contained in:
codytseng
2025-09-24 10:08:49 +08:00
parent 9267458bca
commit b73b3512f3

View File

@@ -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}`)
}
},