mirror of
https://github.com/Icinga/icinga2.git
synced 2026-03-22 02:21:56 -04: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
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Reference in a new issue