diff --git a/tools/sql/handler.go b/tools/sql/handler.go index f5ac97b68a6..bace5ab3bd5 100644 --- a/tools/sql/handler.go +++ b/tools/sql/handler.go @@ -71,6 +71,7 @@ func updateSchema(cli *cli.Context, logger log.Logger) error { conn, err := NewConnection(cfg) if err != nil { logger.Error("Unable to connect to SQL database.", tag.Error(err)) + return err } defer conn.Close() if err := schema.Update(cli, conn, logger); err != nil { @@ -125,6 +126,7 @@ func dropDatabase(cli *cli.Context, logger log.Logger) error { err = DoDropDatabase(cfg, database) if err != nil { logger.Error("Unable to drop SQL database.", tag.Error(err)) + return err } return nil }