From b5cb0c690e53605cb42f34ef4bc02276fd6846e6 Mon Sep 17 00:00:00 2001 From: Aeneas Date: Tue, 13 Jun 2017 16:08:31 +0200 Subject: [PATCH] cmd/server: print full error message on http startup (#514) Towards #513 --- cmd/server/handler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/server/handler.go b/cmd/server/handler.go index 8328740ba6..6e1d2cd1fa 100644 --- a/cmd/server/handler.go +++ b/cmd/server/handler.go @@ -77,7 +77,7 @@ func RunHost(c *config.Config) func(cmd *cobra.Command, args []string) { }, }) - pkg.Must(graceful.Graceful(func() error { + err := graceful.Graceful(func() error { var err error logger.Infof("Setting up http server on %s", c.GetAddress()) if c.ForceHTTP { @@ -91,7 +91,8 @@ func RunHost(c *config.Config) func(cmd *cobra.Command, args []string) { } return err - }, srv.Shutdown), "Could not gracefully run server") + }, srv.Shutdown) + logger.WithError(err).Fatal("Could not gracefully run server") } }