iotagent-node-lib icon indicating copy to clipboard operation
iotagent-node-lib copied to clipboard

better management of device registration failure on orion

Open chicco785 opened this issue 4 years ago • 5 comments

As of today if orion returns 400 during registration, the registration fails. This means that the configuration data of the device are deleted, and you have to provide them again. While if you are just shutting API calls, that's not much a problem, UI users may find annoying that the configuration is not persisted despite the error.

To handle the situation, it could be nice to have in the device a field status which in case of errors is updated with proper code errors. @fgalan @jason-fox @AlvaroVega feelings?

chicco785 avatar Dec 01 '20 12:12 chicco785

A priori, sounds good :)

Could you elaborate a little bit, please? For instance, which possible values are expected for that status field and under which circumstances each one would be used.

fgalan avatar Dec 02 '20 11:12 fgalan

here are few ideas:

  • provisioning failed: when the provisioning of a device fails.
  • update registration failed: when the update of a device fails (toward orion).
  • ok: when the provisioning / update works fine.
  • cannot send data: when cannot update entity on orion
  • sending data: when update to orion works

chicco785 avatar Dec 02 '20 18:12 chicco785

I think is a good proposal but in order to have it fully clear (and to provide a useful guideline for the implementation) maybe a state diagram showing the different state transitions would help.

fgalan avatar Dec 03 '20 11:12 fgalan

Hi @fgalan , @chicco785 Could you please elaborate on this issue?

Madhu-NEC avatar Jul 01 '21 05:07 Madhu-NEC

Hi @fgalan , @chicco785 Could you please elaborate on this issue?

I think a good issue description is already provided in the issue body itself and further comments. Which specific doubt do you have?

fgalan avatar Jul 16 '21 08:07 fgalan