mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 06:05:01 +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));
|
DiagnosticInformation(ex));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (objs.empty()) {
|
||||||
|
HttpUtility::SendJsonError(response, params, 404,
|
||||||
|
"No objects found.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
FilterUtility::CheckPermission(user, permission);
|
FilterUtility::CheckPermission(user, permission);
|
||||||
objs.emplace_back(nullptr);
|
objs.emplace_back(nullptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user