-
Notifications
You must be signed in to change notification settings - Fork 87
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
add device/group information to error log about some errors #1582
Conversation
AlvaroVega
commented
Feb 21, 2024
•
edited
Loading
edited
- EntityGenericError
- BadTimestamp
- TypeNotFound
- DeviceNotFound
- MissingAttributes
- DuplicateDeviceId
- DuplicateGroup
- CommandNotFound
- GroupNotFound
- BadGeocoordinates
related: #1536 |
curl -i -X POST 'http://localhost:7897/iot/json?i=dispNew&k=izc9cokegoy7kyfgdd6etipt6&t=null' -d '{ "c": 3, "d": 4}' -H 'content-type: application/json' {"name":"DEVICE_GROUP_NOT_FOUND","message":"Couldn\t find device group for fields: ["resource","apikey"] and values: {"resource":"/iot/json","apikey":"izc9cokegoy7kyfgdd6etipt6"}"} and curl -i -X POST 'http://localhost:7897/iot/json?i=dispNew&k=zrvj173zhvzb12t233z48vg96&t=null' -d '{ "c": 3, "d": 4}' -H 'content-type: application/json' {"name":"BAD_TIMESTAMP","message":"Invalid ISO8601 timestamp [null] in [thing:dispNew] with: {"lazy":[],"commands":[],"staticAttributes":[],"_id":"65d6f363f2a300f0ee1ab67b","creationDate":"2024-02-22T07:10:27.765Z","id":"dispNew","type":"thing","name":"thing:dispNew","service":"smartcity","subservice":"/","apikey":"zrvj173zhvzb12t233z48vg96","protocol":"IoTA-JSON","__v":0,"active":[],"subscriptions":[],"timestamp":true}"} |
@@ -600,7 +600,7 @@ describe('NGSI-LD - Active attributes test', function () { | |||
should.exist(error.name); | |||
error.code.should.equal(207); | |||
error.details.notUpdated.should.equal('someEntities'); | |||
error.message.should.equal('Error accesing entity data for device: light1 of type: Light'); | |||
//error.message.should.equal('Error accesing entity data for device: light1 of type: Light'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this line be "recovered" ?
//error.message.should.equal('Error accesing entity data for device: light1 of type: Light'); | |
error.message.should.equal('Error accesing entity data for device: light1 of type: Light'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not, current message is more large and include a lot of fields of device.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM