fix(store): replace panic with error return, handle unmarshal errors

generateToken() now returns (string, error) instead of panicking on
crypto/rand failure. All json.Unmarshal calls for alert settings now
check and propagate errors instead of silently ignoring them.

Adds Close() to Store interface for graceful shutdown support.
Skips malformed notification entries during Kuma import.
This commit is contained in:
2026-05-23 13:15:39 -04:00
parent ba53845193
commit ae141c62ba
4 changed files with 33 additions and 9 deletions
+3
View File
@@ -64,4 +64,7 @@ type Store interface {
// Backup & Restore
ExportData() (models.Backup, error)
ImportData(data models.Backup) error
// Lifecycle
Close() error
}