From 064d5e91947c7d24883595337a94a6bc172d3881 Mon Sep 17 00:00:00 2001 From: Mattia Codato Date: Wed, 29 Jul 2020 08:57:22 +0200 Subject: [PATCH] Keep consistency with other methods in case of missing API listener --- lib/icinga/clusterevents.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/icinga/clusterevents.cpp b/lib/icinga/clusterevents.cpp index 66eec6da1..70aca9765 100644 --- a/lib/icinga/clusterevents.cpp +++ b/lib/icinga/clusterevents.cpp @@ -946,7 +946,7 @@ Value ClusterEvents::ExecutedCommandAPIHandler(const MessageOrigin::Ptr& origin, { ApiListener::Ptr listener = ApiListener::GetInstance(); if (!listener) - BOOST_THROW_EXCEPTION(std::invalid_argument("No ApiListener instance configured.")); + return Empty; Endpoint::Ptr endpoint; if (origin->FromClient) {