iotedge-lorawan-starterkit icon indicating copy to clipboard operation
iotedge-lorawan-starterkit copied to clipboard

Handle device refresh failures

Open p-schuler opened this issue 3 years ago • 0 comments

The LoRaDeviceCache does automatically refresh device twin information on a regular basis. If we fail to update the twins of a particular device, we log and continue. Next iteration, the device will be tried again.

If a device fails to refresh for a specific amount of time, and the failure is specific to the device (ignoring connectivity issues to IoT hub), we should remove the device or try to refresh it from through the function (it could be that it was removed from the hub, or the key changed) (#912).

Depending on the error we should apply different resolutions:

  1. If it is indicating an access problem, we should refresh the private key and re-establish the connection
  2. Investigate what error we get when the device is deleted from the hub and implement the removal of the device
  3. other errors should remove the device.

p-schuler avatar Nov 30 '21 05:11 p-schuler