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

API: Internal error 500 when creating a device twice #160

Open
cdupont opened this issue Sep 7, 2021 · 1 comment
Open

API: Internal error 500 when creating a device twice #160

cdupont opened this issue Sep 7, 2021 · 1 comment
Assignees
Labels

Comments

@cdupont
Copy link
Contributor

cdupont commented Sep 7, 2021

If you try to create a device twice, it result in an error 500:

$ TOK=`curl -vvv -X POST "http://172.16.11.187/auth/token" -d "{\"username\":\"admin\",\"password\":\"loragateway\"}" | tr -d '"'`
$ curl -X POST "http://172.16.11.187/devices" -H  "accept: text/plain" -H  "Content-Type: application/json" -H "Authorization: Bearer $TOK" -d '{"id" : "test"}'
$ curl -X POST "http://172.16.11.187/devices" -H  "accept: text/plain" -H  "Content-Type: application/json" -H "Authorization: Bearer $TOK" -d '{"id" : "test"}'
HTTP/1.1 500 Internal Server Error
@j-forster
Copy link
Member

It is not intended to allow passing Ids when creating any entity - it results in undefined behavior right now.
Dealing with that problem will be covered by #161.

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

2 participants