weed/replication/sub: fix dropped error (#4865)

This commit is contained in:
Lars Lehtonen 2023-09-25 07:33:18 -07:00 committed by GitHub
parent a40888d343
commit 28a3a31b27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,