I'm developing a web application in .NET Core 3 and I'm using the Microsoft.Azure.Devices.RegistryManager to access an Azure Iot hub.
When I call registryManager.UpdateTwinAsync(), I have to send in the "etag". And sometimes the etag changes and I get errors stating that there is an etag mismatch.
I basically don't understand what the etag's purpose is and how I can update device twins in a safe manner. Anyone?
I tried catching those exceptions and fetching the etag from the device twin and retrying up to 15 times in a row with 2 seconds wait in between and that helps, but this error pops up every now and then. I would think that applying the device id would be enough to update a device twin but apparently not
Please help!

