mirror of https://github.com/Icinga/icinga2.git
Fix verbose error handling in variable and template query handlers
This commit is contained in:
parent
3e83e94c15
commit
6b2decb44b
|
@ -127,7 +127,7 @@ bool TemplateQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest&
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
HttpUtility::SendJsonError(response, params, 404,
|
HttpUtility::SendJsonError(response, params, 404,
|
||||||
"No templates found.",
|
"No templates found.",
|
||||||
HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : "");
|
DiagnosticInformation(ex));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ bool VariableQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest&
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
HttpUtility::SendJsonError(response, params, 404,
|
HttpUtility::SendJsonError(response, params, 404,
|
||||||
"No variables found.",
|
"No variables found.",
|
||||||
HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : "");
|
DiagnosticInformation(ex));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue