synse-server icon indicating copy to clipboard operation
synse-server copied to clipboard

consider better error message when device not found

Open edaniszewski opened this issue 3 years ago • 0 comments

from a recent script:

Running Synse query:
  method: POST
  url:    localhost:5000/v3/write/wait/d7604ac1-3444-5fe0-bada-e8b9f11a411b
  data:   {"action": "set", "data": "4"}

{
  "http_code": 404,
  "description": "resource not found",
  "timestamp": "2021-01-12T12:45:10Z",
  "context": "plugin not found for device d7604ac1-3444-5fe0-bada-e8b9f11a411b"
}

The error message says that the plugin is not found for device because its looking up a plugin to route the request to, so it sorta makes sense to someone familiar with the internals of synse, but its maybe a better error message to say that the device was not found, and maybe add in extra context about how theres an off chance that it could be due to plugin cache invalidation stuff.

edaniszewski avatar Jan 12 '21 15:01 edaniszewski