Skip to content

Commit

Permalink
Remove full message from error logs (#2912)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Apr 3, 2024
1 parent e1954bb commit 93b9000
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions snow/networking/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,10 @@ func (h *handler) dispatchSync(ctx context.Context) {
// If there is an error handling the message, shut down the chain
if err := h.handleSyncMsg(ctx, msg); err != nil {
h.StopWithError(ctx, fmt.Errorf(
"%w while processing sync message: %s",
"%w while processing sync message: %s from %s",
err,
msg,
msg.Op(),
msg.NodeID(),
))
return
}
Expand Down Expand Up @@ -429,7 +430,7 @@ func (h *handler) dispatchChans(ctx context.Context) {
h.StopWithError(ctx, fmt.Errorf(
"%w while processing chan message: %s",
err,
msg,
msg.Op(),
))
return
}
Expand Down Expand Up @@ -766,9 +767,10 @@ func (h *handler) handleAsyncMsg(ctx context.Context, msg Message) {
h.asyncMessagePool.Go(func() error {
if err := h.executeAsyncMsg(ctx, msg); err != nil {
h.StopWithError(ctx, fmt.Errorf(
"%w while processing async message: %s",
"%w while processing async message: %s from %s",
err,
msg,
msg.Op(),
msg.NodeID(),
))
}
return nil
Expand Down

0 comments on commit 93b9000

Please sign in to comment.