summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/storage.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/storage.go b/storage/storage.go
index 7d0d941..08cd81a 100644
--- a/storage/storage.go
+++ b/storage/storage.go
@@ -69,9 +69,9 @@ func (p ProviderSQL) RemoveChat(id uint32) error {
func NewProviderSQL(dbPath string, logger *slog.Logger) FullRepo {
db, err := sqlx.Open("sqlite", dbPath)
if err != nil {
- panic(err)
+ logger.Error("failed to open db connection", "error", err)
+ return nil
}
- // get SQLite version
p := ProviderSQL{db: db, logger: logger}
p.Migrate()
return p