mirror of
https://github.com/dergigi/boris.git
synced 2025-12-24 10:04:19 +01:00
debug: add detailed error logging to buildAndEmitBookmarks
Added logging at each step: - Before calling collectBookmarksFromEvents - After collectBookmarksFromEvents returns - Detailed error info if it fails (message + stack) This will show us exactly where the silent failure is happening.
This commit is contained in:
@@ -117,9 +117,11 @@ class BookmarkController {
|
||||
}
|
||||
|
||||
try {
|
||||
console.log('[controller] 🔧 Calling collectBookmarksFromEvents with', readyEvents.length, 'events')
|
||||
// Collect bookmarks from ready events only
|
||||
const { publicItemsAll, privateItemsAll, newestCreatedAt, latestContent, allTags } =
|
||||
await collectBookmarksFromEvents(readyEvents, activeAccount, signerCandidate)
|
||||
console.log('[controller] 🔧 collectBookmarksFromEvents returned:', publicItemsAll.length, 'public,', privateItemsAll.length, 'private')
|
||||
|
||||
const allItems = [...publicItemsAll, ...privateItemsAll]
|
||||
|
||||
@@ -231,6 +233,8 @@ class BookmarkController {
|
||||
this.bookmarksListeners.forEach(cb => cb([bookmark]))
|
||||
} catch (error) {
|
||||
console.error('[controller] ❌ Failed to build bookmarks:', error)
|
||||
console.error('[controller] ❌ Error details:', error instanceof Error ? error.message : String(error))
|
||||
console.error('[controller] ❌ Stack:', error instanceof Error ? error.stack : 'no stack')
|
||||
this.bookmarksListeners.forEach(cb => cb([]))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user