From 28a3a31b2704e5dc86d1ac8a6d345fc4cefab354 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Mon, 25 Sep 2023 07:33:18 -0700 Subject: [PATCH] weed/replication/sub: fix dropped error (#4865) --- weed/replication/sub/notification_aws_sqs.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/weed/replication/sub/notification_aws_sqs.go b/weed/replication/sub/notification_aws_sqs.go index 0201d4f9c..7fc5c3f46 100644 --- a/weed/replication/sub/notification_aws_sqs.go +++ b/weed/replication/sub/notification_aws_sqs.go @@ -99,7 +99,10 @@ func (k *AwsSqsInput) ReceiveMessage() (key string, message *filer_pb.EventNotif text := *result.Messages[0].Body message = &filer_pb.EventNotification{} err = proto.Unmarshal([]byte(text), message) - + if err != nil { + err = fmt.Errorf("unmarshal message from sqs %s: %w", k.queueUrl, err) + return + } // delete the message _, err = k.svc.DeleteMessage(&sqs.DeleteMessageInput{ QueueUrl: &k.queueUrl,