Skip to content

Commit a20cbfc

Browse files
committed
Add console.error
1 parent 215a4c8 commit a20cbfc

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

frontend/src/routes/(root)/(logged)/tutorials/+page.svelte

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,15 +185,23 @@
185185
// Skip all tutorials in current tab
186186
async function skipCurrentTabTutorials() {
187187
if (currentTabIndexes.length === 0) return
188-
await skipTutorialsByIndexes(currentTabIndexes)
189-
await syncTutorialsTodos()
188+
try {
189+
await skipTutorialsByIndexes(currentTabIndexes)
190+
await syncTutorialsTodos()
191+
} catch (error) {
192+
console.error('Error marking tutorials as completed:', error)
193+
}
190194
}
191195
192196
// Reset all tutorials in current tab
193197
async function resetCurrentTabTutorials() {
194198
if (currentTabIndexes.length === 0) return
195-
await resetTutorialsByIndexes(currentTabIndexes)
196-
await syncTutorialsTodos()
199+
try {
200+
await resetTutorialsByIndexes(currentTabIndexes)
201+
await syncTutorialsTodos()
202+
} catch (error) {
203+
console.error('Error resetting tutorials:', error)
204+
}
197205
}
198206
199207
// Update a single tutorial's completion status

0 commit comments

Comments
 (0)