Skip to content

Commit

Permalink
Don't log error if there is no error
Browse files Browse the repository at this point in the history
  • Loading branch information
rsafonseca committed Apr 30, 2024
1 parent 131ffb3 commit 668d1e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ func (c *Client) registerMetrics(configPrefix string) {
metrics.ClientRequestsDroppedCounter,
}
err := metrics.RegisterMetrics(collectors)
c.logger.WithError(err).Error("failed to register metric")
if err != nil {
c.logger.WithError(err).Error("failed to register metric")
}
}

// Send sends an event to another server via grpc using the client's configured topic
Expand Down

0 comments on commit 668d1e8

Please sign in to comment.