packages = ConfigPackageUtility::GetPackages();
} catch (const std::exception& ex) {
HttpUtility::SendJsonError(response, params, 500, "Could not retrieve packages.",
- HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : "");
+ DiagnosticInformation(ex, false));
return;
}
String packageName = HttpUtility::GetLastParameter(params, "package");
if (!ConfigPackageUtility::ValidateName(packageName)) {
- HttpUtility::SendJsonError(response, params, 400, "Invalid package name.");
+ HttpUtility::SendJsonError(response, params, 400, "Invalid package name '" + packageName + "'.");
return;
}
boost::mutex::scoped_lock lock(ConfigPackageUtility::GetStaticMutex());
ConfigPackageUtility::CreatePackage(packageName);
} catch (const std::exception& ex) {
- HttpUtility::SendJsonError(response, params, 500, "Could not create package.",
- HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : "");
+ HttpUtility::SendJsonError(response, params, 500, "Could not create package '" + packageName + "'.",
+ DiagnosticInformation(ex, false));
return;
}
String packageName = HttpUtility::GetLastParameter(params, "package");
if (!ConfigPackageUtility::ValidateName(packageName)) {
- HttpUtility::SendJsonError(response, params, 400, "Invalid package name.");
+ HttpUtility::SendJsonError(response, params, 400, "Invalid package name '" + packageName + "'.");
return;
}