Keep consistency with other methods in case of missing API listener

This commit is contained in:
Mattia Codato 2020-07-29 08:57:22 +02:00
parent edb5c47a9d
commit 064d5e9194

View File

@ -946,7 +946,7 @@ Value ClusterEvents::ExecutedCommandAPIHandler(const MessageOrigin::Ptr& origin,
{ {
ApiListener::Ptr listener = ApiListener::GetInstance(); ApiListener::Ptr listener = ApiListener::GetInstance();
if (!listener) if (!listener)
BOOST_THROW_EXCEPTION(std::invalid_argument("No ApiListener instance configured.")); return Empty;
Endpoint::Ptr endpoint; Endpoint::Ptr endpoint;
if (origin->FromClient) { if (origin->FromClient) {