Gateway.sendall

i am trying to optimize some old code to use sendall
but am getting this error “An item with the same key has already been added. Key: X-AutoBatch-Completed”
what is used to make the requests unique?
perhaps this is a duplicate response(not sure ) is x-autobatch-completed a header?

Please include the full StackTrace of the Exception.