debug: add logging to get_categories + better error details in CalendarPluginPage

This commit is contained in:
mirivlad 2026-06-08 12:01:29 +08:00
parent a202c5d079
commit 5069472e19
4 changed files with 7 additions and 5 deletions

View File

@ -19,7 +19,7 @@
background: #13131f; background: #13131f;
} }
</style> </style>
<script type="module" crossorigin src="/assets/main-BZoJ6Hxg.js"></script> <script type="module" crossorigin src="/assets/main-OHW3omcP.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-B1PBee3I.css"> <link rel="stylesheet" crossorigin href="/assets/main-B1PBee3I.css">
</head> </head>
<body> <body>

View File

@ -80,6 +80,7 @@ end
-- Get all non-deleted categories -- Get all non-deleted categories
function M.get_categories() function M.get_categories()
print("get_categories called")
return verstak.db.query( return verstak.db.query(
"SELECT id, name, color, icon, sort_order FROM categories WHERE deleted = 0 ORDER BY sort_order" "SELECT id, name, color, icon, sort_order FROM categories WHERE deleted = 0 ORDER BY sort_order"
) )

View File

@ -107,6 +107,7 @@
}) })
} catch (e) { } catch (e) {
console.error('[CalendarPluginPage] loadCalendarData:', e) console.error('[CalendarPluginPage] loadCalendarData:', e)
console.log('[CalendarPluginPage] error details:', JSON.stringify({message: String(e), stack: e?.stack}))
error = String(e) error = String(e)
} }
} }