Skip to content

Commit

Permalink
Improve publish error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
lthibault committed Aug 9, 2023
1 parent e4f7cbc commit e1cc829
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (s *Client) PublishBuilderBid(ctx context.Context, bid structs.BuilderBidEx

timer2 := prometheus.NewTimer(s.m.Timing.WithLabelValues("publishBuilderBid", "publish"))
if err := s.Bids.Publish(ctx, msg); err != nil {
return fmt.Errorf("fail to encode encode and stream block: %w", err)
return fmt.Errorf("publish bid: %w", err)
}
timer2.ObserveDuration()
l.WithField("timestamp", time.Now()).
Expand Down Expand Up @@ -248,7 +248,7 @@ func (s *Client) PublishBlockCache(ctx context.Context, block structs.BlockAndTr

timer2 := prometheus.NewTimer(s.m.Timing.WithLabelValues("publishCacheBlock", "publish"))
if err := s.Cache.Publish(ctx, msg); err != nil {
return fmt.Errorf("fail to publish cache block: %w", err)
return fmt.Errorf("publish block: %w", err)
}
timer2.ObserveDuration()
l.WithField("timestamp", time.Now()).
Expand Down

0 comments on commit e1cc829

Please sign in to comment.