diff --git a/cmd/gateway-main.go b/cmd/gateway-main.go index 70f26b2b2..05d7aa672 100644 --- a/cmd/gateway-main.go +++ b/cmd/gateway-main.go @@ -144,7 +144,8 @@ func startGateway(ctx *cli.Context, gw Gateway) { // Validate if we have access, secret set through environment. gatewayName := gw.Name() if !globalIsEnvCreds { - fatalIf(fmt.Errorf("Access and Secret keys should be set through ENVs for backend [%s]", gatewayName), "") + errorIf(errors.New("Access and secret keys not set"), "Access and Secret keys should be set through ENVs for backend [%s]", gatewayName) + cli.ShowCommandHelpAndExit(ctx, gatewayName, 1) } // Create certs path.