From c2af15e16b95633b2ad5939e67d4911efafaea01 Mon Sep 17 00:00:00 2001 From: Alistair Singh Date: Tue, 3 Sep 2024 01:39:44 +0200 Subject: [PATCH] log fatal on config parse error (#1280) --- relayer/cmd/run/beacon/command.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/relayer/cmd/run/beacon/command.go b/relayer/cmd/run/beacon/command.go index b4abb8ff58..2b0604d36a 100644 --- a/relayer/cmd/run/beacon/command.go +++ b/relayer/cmd/run/beacon/command.go @@ -2,7 +2,6 @@ package beacon import ( "context" - "fmt" "log" "os" "os/signal" @@ -21,7 +20,7 @@ var ( configFile string privateKey string privateKeyFile string - privateKeyID string + privateKeyID string ) func Command() *cobra.Command { @@ -39,7 +38,6 @@ func Command() *cobra.Command { cmd.Flags().StringVar(&privateKeyFile, "substrate.private-key-file", "", "The file from which to read the private key URI") cmd.Flags().StringVar(&privateKeyID, "substrate.private-key-id", "", "The secret id to lookup the private key in AWS Secrets Manager") - return cmd } @@ -62,7 +60,8 @@ func run(_ *cobra.Command, _ []string) error { err = config.Validate() if err != nil { - return fmt.Errorf("config file validation failed: %w", err) + logrus.WithError(err).Fatal("Configuration file validation failed") + return err } keypair, err := parachain.ResolvePrivateKey(privateKey, privateKeyFile, privateKeyID)