Fix verbose error handling in variable and template query handlers

This commit is contained in:
Michael Friedrich 2018-04-06 12:50:06 +02:00
parent 3e83e94c15
commit 6b2decb44b
2 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ bool TemplateQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest&
} catch (const std::exception& ex) {
HttpUtility::SendJsonError(response, params, 404,
"No templates found.",
HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : "");
DiagnosticInformation(ex));
return true;
}

View File

@ -97,7 +97,7 @@ bool VariableQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest&
} catch (const std::exception& ex) {
HttpUtility::SendJsonError(response, params, 404,
"No variables found.",
HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : "");
DiagnosticInformation(ex));
return true;
}