Skip to content

Commit

Permalink
use fmt.errorf
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Nov 21, 2023
1 parent 18a103e commit 3404fb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flow/cmd/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
3 changes: 1 addition & 2 deletions flow/cmd/snapshot_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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{
Expand Down

0 comments on commit 3404fb6

Please sign in to comment.