Füge myTischtennis-Verbindung hinzu: Ergänze Navigationslinks, verbessere Fehlerbehandlung und aktualisiere Import-Logik
All checks were successful
Code Analysis and Production Deploy / analyze (push) Successful in 4m36s
Code Analysis and Production Deploy / deploy-production (push) Has been skipped
Code Analysis and Production Deploy / deploy-test (push) Successful in 2m33s

This commit is contained in:
Torsten Schulz (local)
2026-09-04 14:24:11 +02:00
parent 497d804244
commit 63b5786e43
3 changed files with 22 additions and 3 deletions

View File

@@ -13,7 +13,9 @@ export default defineEventHandler(async (event) => {
const result = await importQttrValues({ connection })
return { success: true, rowCount: result.rowCount, importedAt: result.importedAt }
} catch (error) {
await saveMyTischtennisConnection({ ...connection, lastImportError: String(error.message || error).slice(0, 500) })
throw createError({ statusCode: 502, statusMessage: 'TTR-Abruf bei myTischtennis fehlgeschlagen.' })
const detail = String(error.message || error).slice(0, 500)
console.error('[mytischtennis] TTR-Abruf fehlgeschlagen:', detail)
await saveMyTischtennisConnection({ ...connection, lastImportError: detail })
throw createError({ statusCode: 502, statusMessage: `TTR-Abruf fehlgeschlagen: ${detail}` })
}
})