From 533806893febbd4350866e61c9b8ca60415bd707 Mon Sep 17 00:00:00 2001 From: mcrakhman Date: Wed, 19 Apr 2023 19:34:31 +0200 Subject: [PATCH] Add logs if failed to get object --- commonspace/objectsync/objectsync.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commonspace/objectsync/objectsync.go b/commonspace/objectsync/objectsync.go index 6cd39695..10075d34 100644 --- a/commonspace/objectsync/objectsync.go +++ b/commonspace/objectsync/objectsync.go @@ -87,12 +87,13 @@ func (s *objectSync) handleMessage(ctx context.Context, senderId string, msg *sp return spacesyncproto.ErrSpaceIsDeleted } } - log.With(zap.String("objectId", msg.ObjectId), zap.String("replyId", msg.ReplyId)).DebugCtx(ctx, "handling message") + log.DebugCtx(ctx, "handling message") obj, err := s.objectGetter.GetObject(ctx, msg.ObjectId) if err != nil { + log.DebugCtx(ctx, "failed to get object") respErr := s.sendErrorResponse(ctx, msg, senderId) if respErr != nil { - log.Debug("failed to send error response", zap.Error(respErr)) + log.DebugCtx(ctx, "failed to send error response", zap.Error(respErr)) } return }