Device registration request continuously fails with 409 (Conflict) when network already exists
In some cases, request to device PUT method continuously (retries do not help) fails with 409 conflict status. This is probably related to the already existing network. Here is an example JSON (notice that the network default should be already registered in the DH):
{
name: 'some-name',
key: '00000000-0000-0000-0000-000000000000',
network: { name: 'default' },
status: 'Online',
deviceClass: { name: 'some-class', version: '0.1', equipment: [] }
}
Here is an example of the response:
{
"error": null,
"message": "Error occurred. Please, retry again"
}
Can it be that network with same name exists under different user/access token? In such case it cannot be reused by name neither can be duplicate created. The error is not informative though so hard to tell. I just tried registering devices using ws in existing network and it was ok for many many devices in a row.
In the DH installation where this issue is reproducible, there is only 1 default admin user and only 1 Default access key. So I do no think this can be the case
Is this a duplicate of issue #10 ?
@demon-xxi Not sure about that. #10 says about concurrent registration requests with the same deviceClass. This issue might be related to the deviceClass but to reproduce it I did not use parallel requests.
Moving this issue to the backlog cause it seems to be not reproducible on 2.0.2-SHAPSHOT version of DH (spring boot based server).