diff --git a/flow/cmd/api.go b/flow/cmd/api.go index 31e02c9bfe..98bb798a63 100644 --- a/flow/cmd/api.go +++ b/flow/cmd/api.go @@ -67,7 +67,7 @@ func APIMain(args *APIServerParams) error { if args.TemporalCert != "" && args.TemporalKey != "" { cert, err := tls.X509KeyPair([]byte(args.TemporalCert), []byte(args.TemporalKey)) if err != nil { - log.Fatalln("Unable to load cert and key pair.", err) + return fmt.Errorf("unable to obtain temporal key pair: %w", err) } connOptions := client.ConnectionOptions{ diff --git a/flow/cmd/snapshot_worker.go b/flow/cmd/snapshot_worker.go index aa29fb72c3..5b5ea65b3c 100644 --- a/flow/cmd/snapshot_worker.go +++ b/flow/cmd/snapshot_worker.go @@ -7,7 +7,6 @@ import ( "github.com/PeerDB-io/peer-flow/activities" "github.com/PeerDB-io/peer-flow/shared" peerflow "github.com/PeerDB-io/peer-flow/workflows" - log "github.com/sirupsen/logrus" "go.temporal.io/sdk/client" "go.temporal.io/sdk/worker" @@ -29,7 +28,7 @@ func SnapshotWorkerMain(opts *SnapshotWorkerOptions) error { if opts.TemporalCert != "" && opts.TemporalKey != "" { cert, err := tls.X509KeyPair([]byte(opts.TemporalCert), []byte(opts.TemporalKey)) if err != nil { - log.Fatalln("Unable to load cert and key pair.", err) + return fmt.Errorf("unable to obtain temporal key pair: %w", err) } connOptions := client.ConnectionOptions{