From 78a05d39c4d7f03a26b4b379486c665c3c3a52eb Mon Sep 17 00:00:00 2001 From: Cesar N <11819101+cesnietor@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:06:42 -0700 Subject: [PATCH] Log error if it exists while serving APIs (#3276) Co-authored-by: cesnietor <> --- cmd/console/app_commands.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/console/app_commands.go b/cmd/console/app_commands.go index a461a0374..173c5ca93 100644 --- a/cmd/console/app_commands.go +++ b/cmd/console/app_commands.go @@ -86,5 +86,10 @@ func StartServer(ctx *cli.Context) error { defer server.Shutdown() - return server.Serve() + if err = server.Serve(); err != nil { + server.Logf("error serving API: %v", err) + return err + } + + return nil }