From 93b90006917df93df6de10a819c4005d81777445 Mon Sep 17 00:00:00 2001 From: Stephen Buttolph Date: Wed, 3 Apr 2024 17:29:21 -0400 Subject: [PATCH] Remove full message from error logs (#2912) --- snow/networking/handler/handler.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/snow/networking/handler/handler.go b/snow/networking/handler/handler.go index 8878e4d2f770..1f5a30d839c0 100644 --- a/snow/networking/handler/handler.go +++ b/snow/networking/handler/handler.go @@ -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 } @@ -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 } @@ -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