synse-server
synse-server copied to clipboard
consider better error message when device not found
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.