/v1/actions/*: return 404 if no objects found

refs #7956
This commit is contained in:
Alexander A. Klimov 2020-04-02 11:50:07 +02:00
parent 71cefb9ea4
commit bce51c1af5
1 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,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);