debug: add logging to bookmark decrypt error handling

- Log nip04/nip44 decrypt errors instead of silently ignoring
- Will help identify why bookmark decryption is timing out with bunker
- Timeout errors will now be visible in console
This commit is contained in:
Gigi
2025-10-16 23:55:30 +02:00
parent 685aaf43b0
commit f451348430

View File

@@ -92,7 +92,8 @@ export async function collectBookmarksFromEvents(
} catch {
try {
await Helpers.unlockHiddenTags(evt, signerCandidate as HiddenContentSigner, 'nip44' as UnlockMode)
} catch {
} catch (err) {
console.log("[bunker] ❌ nip44.decrypt failed:", err instanceof Error ? err.message : String(err))
// ignore
}
}
@@ -105,7 +106,8 @@ export async function collectBookmarksFromEvents(
evt.content
))
}
} catch {
} catch (err) {
console.log("[bunker] ❌ nip44.decrypt failed:", err instanceof Error ? err.message : String(err))
// ignore
}
@@ -117,7 +119,8 @@ export async function collectBookmarksFromEvents(
evt.content
))
}
} catch {
} catch (err) {
console.log("[bunker] ❌ nip04.decrypt failed:", err instanceof Error ? err.message : String(err))
// ignore
}
}
@@ -139,7 +142,7 @@ export async function collectBookmarksFromEvents(
Reflect.set(evt, BookmarkHiddenSymbol, manualPrivate)
Reflect.set(evt, 'EncryptedContentSymbol', decryptedContent)
// Don't set latestContent to decrypted JSON - it's not user-facing content
} catch {
} catch (err) {
// ignore
}
}