diff --git a/lib/remote/actionshandler.cpp b/lib/remote/actionshandler.cpp index 80f06e603..016c76d57 100644 --- a/lib/remote/actionshandler.cpp +++ b/lib/remote/actionshandler.cpp @@ -62,6 +62,12 @@ bool ActionsHandler::HandleRequest( DiagnosticInformation(ex)); return true; } + + if (objs.empty()) { + HttpUtility::SendJsonError(response, params, 404, + "No objects found."); + return true; + } } else { FilterUtility::CheckPermission(user, permission); objs.emplace_back(nullptr);