Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 401: "Device with such guid = unique-device-name not found" #181

Open
demon-xxi opened this issue Jan 5, 2016 · 0 comments
Open
Labels

Comments

@demon-xxi
Copy link
Collaborator

When trying to create device with same id existing for another user - the following error is thrown:

{

"error": 401,
"message": "Device with such guid = unique-device-name not found"
}

while it gives correct 401 code the message is misleading.
At minimum, let's change it to something like "Device with guid='xyz_abc' is not available to this user."

But for future we need a better way to handle unique device ids for multi-tenancy case. Ideally have a unique device id/name only within same network.

Issue can be reproduced with the curl:

curl -X PUT \
    -H "Authorization: Bearer INSERT_YOUR_ACCESS_TOKEN_BEFORE_CALL=" \
    -H "Content-Type: application/json" \
    -d '{"name" : "unique-device-name", "deviceClass": {"name" : "default device", "version": "1.0"}}' \
    'http://playground.devicehive.com/api/rest/device/unique-device-name'
@demon-xxi demon-xxi added the bug label Jan 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant