From aad8a395ed8f28e108ccdf6b151dc7ae386e33ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Mon, 17 Sep 2018 17:57:26 +0200 Subject: [PATCH] Fix return value of database.Connect method --- internal/database/database.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/database/database.go b/internal/database/database.go index 577e022..02aca18 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -40,7 +40,8 @@ func Connect(path string) (db sqlbuilder.Database, err error) { err = RunMigrations(sess.Driver().(*sql.DB)) if err != nil { - db = nil + log.WithError(err).Error("failed to run DB migration") + return nil, err } return sess, err }