mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
Fix object and status query verbose errors
This commit is contained in:
parent
c4a6ab0211
commit
3e83e94c15
@ -129,7 +129,7 @@ bool ObjectQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& re
|
|||||||
uattrs = params->Get("attrs");
|
uattrs = params->Get("attrs");
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
HttpUtility::SendJsonError(response, params, 400,
|
HttpUtility::SendJsonError(response, params, 400,
|
||||||
"Invalid type for 'attrs' attribute specified. Array type is required.", Empty);
|
"Invalid type for 'attrs' attribute specified. Array type is required.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ bool ObjectQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& re
|
|||||||
ujoins = params->Get("joins");
|
ujoins = params->Get("joins");
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
HttpUtility::SendJsonError(response, params, 400,
|
HttpUtility::SendJsonError(response, params, 400,
|
||||||
"Invalid type for 'joins' attribute specified. Array type is required.", Empty);
|
"Invalid type for 'joins' attribute specified. Array type is required.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ bool ObjectQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& re
|
|||||||
umetas = params->Get("meta");
|
umetas = params->Get("meta");
|
||||||
} catch (const std::exception&) {
|
} catch (const std::exception&) {
|
||||||
HttpUtility::SendJsonError(response, params, 400,
|
HttpUtility::SendJsonError(response, params, 400,
|
||||||
"Invalid type for 'meta' attribute specified. Array type is required.", Empty);
|
"Invalid type for 'meta' attribute specified. Array type is required.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ bool ObjectQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& re
|
|||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
HttpUtility::SendJsonError(response, params, 404,
|
HttpUtility::SendJsonError(response, params, 404,
|
||||||
"No objects found.",
|
"No objects found.",
|
||||||
HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : "");
|
DiagnosticInformation(ex));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ bool StatusHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& request
|
|||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
HttpUtility::SendJsonError(response, params, 404,
|
HttpUtility::SendJsonError(response, params, 404,
|
||||||
"No objects found.",
|
"No objects found.",
|
||||||
HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : "");
|
DiagnosticInformation(ex));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user