diff --git a/dbutil/database.go b/dbutil/database.go index 8c4e1e1..c4b77a5 100644 --- a/dbutil/database.go +++ b/dbutil/database.go @@ -199,7 +199,7 @@ func (db *Database) Close() error { if db.ReadOnlyDB != nil { err2 := db.ReadOnlyDB.Close() if err == nil { - err = fmt.Errorf("closing read-only db failed: %w", err) + err = fmt.Errorf("closing read-only db failed: %w", err2) } else { err = fmt.Errorf("%w (closing read-only db also failed: %v)", err, err2) }