goaws icon indicating copy to clipboard operation
goaws copied to clipboard

Fix erroneous "not found" responses in DeleteMessageBatch

Open adventureisyou opened this issue 1 year ago • 2 comments

When looping through messages, the "deleted" indicator was being updated in the copy of deleteEntry within the loop rather than updating the slice which is later used to append "not found" errors, so both successes and fails were being returned.

adventureisyou avatar Nov 09 '23 16:11 adventureisyou

@adventureisyou Your change for this looks good, but I think we also need to include a fix for this line. https://github.com/Admiral-Piett/goaws/pull/278/files#diff-e4a9df642f75a9a1287dc9408df6d0de9c9680711caa7d621db50bdd832e4daeR668. I think it needs to be if !deleteEntry.Deleted - otherwise we'd still get the deleted entries in both places.

Would you mind taking care of that update, and throwing a test or so here for it?

Admiral-Piett avatar Nov 10 '23 03:11 Admiral-Piett

@adventureisyou Quick follow up on this, any thoughts on my previous comment?

Admiral-Piett avatar Jan 09 '24 14:01 Admiral-Piett