Refactor db errors

This commit is contained in:
dwrz
2026-10-10 22:51:11 +00:00
parent d4a30901e0
commit 81b981c07f
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -43,10 +43,10 @@ func testConnect(t *testing.T, ctx context.Context) {
t.Fatalf("Connect: %v", err) t.Fatalf("Connect: %v", err)
} }
if db.Writer == nil { if db.Writer == nil {
t.Fatal("Writer is nil") t.Fatal("missing writer")
} }
if db.Reader == nil { if db.Reader == nil {
t.Fatal("Reader is nil") t.Fatal("missing reader")
} }
// Test close. // Test close.
+1 -1
View File
@@ -28,7 +28,7 @@ var migrations embed.FS
// the application code expects a schema that matches the latest migration. // the application code expects a schema that matches the latest migration.
func (s *SQLite) ApplySchema(ctx context.Context, log *slog.Logger) error { func (s *SQLite) ApplySchema(ctx context.Context, log *slog.Logger) error {
if log == nil { if log == nil {
return fmt.Errorf("logger is nil") return fmt.Errorf("missing logger")
} }
var currentVersion int var currentVersion int