diff --git a/roomserver/storage/postgres/storage.go b/roomserver/storage/postgres/storage.go index 2c756bd86..4de926a14 100644 --- a/roomserver/storage/postgres/storage.go +++ b/roomserver/storage/postgres/storage.go @@ -61,7 +61,7 @@ func Open(dbProperties *config.DatabaseOptions, cache caching.RoomServerCaches) // Then prepare the statements. Now that the migrations have run, any columns referred // to in the database code should now exist. if err := d.prepare(db, cache); err != nil { - return nil, fmt.Errorf("Error preparing statements: %v", err) + return nil, err } return &d, nil diff --git a/roomserver/storage/sqlite3/storage.go b/roomserver/storage/sqlite3/storage.go index 5c32954c1..5f499dabc 100644 --- a/roomserver/storage/sqlite3/storage.go +++ b/roomserver/storage/sqlite3/storage.go @@ -18,7 +18,6 @@ package sqlite3 import ( "context" "database/sql" - "fmt" _ "github.com/mattn/go-sqlite3" @@ -72,7 +71,7 @@ func Open(dbProperties *config.DatabaseOptions, cache caching.RoomServerCaches) // Then prepare the statements. Now that the migrations have run, any columns referred // to in the database code should now exist. if err := d.prepare(db, cache); err != nil { - return nil, fmt.Errorf("Error preparing statements: %v", err) + return nil, err } return &d, nil