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

Show thing ID on error when it hasn't schema for a sensor on setData command #8

Open
netoax opened this issue Aug 22, 2019 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers priority: low

Comments

@netoax
Copy link
Contributor

netoax commented Aug 22, 2019

The error is now returned as follows:

{ Error: The thing undefined has no schema for sensor id 1
    at Client.onMessage (/Users/jneto/workspace/knot/cloud/knot-cloud/node_modules/@cesarbr/knot-cloud-websocket/dist/main.js:1392:23)
    at WebSocket.onMessage (/Users/jneto/workspace/knot/cloud/knot-cloud/node_modules/ws/lib/event-target.js:120:16)
    at WebSocket.emit (events.js:198:13)
    at Receiver.receiverOnMessage (/Users/jneto/workspace/knot/cloud/knot-cloud/node_modules/ws/lib/websocket.js:789:20)
    at Receiver.emit (events.js:198:13)
    at Receiver.dataMessage (/Users/jneto/workspace/knot/cloud/knot-cloud/node_modules/ws/lib/receiver.js:422:14)
    at Receiver.getData (/Users/jneto/workspace/knot/cloud/knot-cloud/node_modules/ws/lib/receiver.js:352:17)
    at Receiver.startLoop (/Users/jneto/workspace/knot/cloud/knot-cloud/node_modules/ws/lib/receiver.js:138:22)
    at Receiver._write (/Users/jneto/workspace/knot/cloud/knot-cloud/node_modules/ws/lib/receiver.js:74:10)
    at doWrite (_stream_writable.js:415:12)
  frame:
   '{"type":"error","data":{"code":403,"message":"The thing undefined has no schema for sensor id 1"}}',
  code: 403 }
@netoax netoax added bug Something isn't working priority: low good first issue Good for newcomers labels Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers priority: low
Projects
None yet
Development

No branches or pull requests

1 participant