mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Merge pull request #7958 from Icinga/bugfix/api-500-404-7956
/v1/actions/*: return 404 if no objects found
This commit is contained in:
commit
5fea15e090
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user