summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal-composer-binding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding/signal-composer-binding.cpp')
-rw-r--r--signal-composer-binding/signal-composer-binding.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/signal-composer-binding/signal-composer-binding.cpp b/signal-composer-binding/signal-composer-binding.cpp
index 5932640..310cb40 100644
--- a/signal-composer-binding/signal-composer-binding.cpp
+++ b/signal-composer-binding/signal-composer-binding.cpp
@@ -211,13 +211,19 @@ void addObjects(afb_req request)
if(sourcesJ && composer.loadSources(sourcesJ))
{
- afb_req_fail_f(request, "Loading 'sources' configuration or subscription error", "Error code: -2");
+ afb_req_fail_f(request, "Loading 'sources' configuration or subscription error", "Error code: -4");
return;
}
if(signalsJ)
{
if(!composer.loadSignals(signalsJ))
- {composer.initSignals();}
+ {
+ if(composer.initSignals())
+ {
+ afb_req_fail_f(request, "Loading 'signals' configuration or subscription error", "Error code: -3");
+ return;
+ }
+ }
else
{
afb_req_fail_f(request, "Loading 'signals' configuration or subscription error", "Error code: -2");