diff options
Diffstat (limited to 'high-viwi-binding/high-viwi-binding.cpp')
-rw-r--r-- | high-viwi-binding/high-viwi-binding.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/high-viwi-binding/high-viwi-binding.cpp b/high-viwi-binding/high-viwi-binding.cpp index e42a175..3b54003 100644 --- a/high-viwi-binding/high-viwi-binding.cpp +++ b/high-viwi-binding/high-viwi-binding.cpp @@ -45,7 +45,7 @@ void unsubscribe(afb_req request) if(high.unsubscribe(request)) afb_req_success(request, NULL, NULL); else - afb_req_fail(request, "error", NULL); + afb_req_fail(request, "error when unsubscribe", NULL); } /// @brief verb that loads JSON configuration (old high.json file now) @@ -55,7 +55,11 @@ void load(afb_req request) const char* confd; wrap_json_unpack(args, "{s:s}", "path", &confd); - high.parseConfigAndSubscribe(confd); + int ret = high.parseConfigAndSubscribe(confd); + if( ret == 0) + afb_req_success(request, NULL, NULL); + else + afb_req_fail_f(request, "Loading configuration or subscription error", "Error code: %d", ret); } /// @brief entry point for get requests. Treatment itself is made in High class. |