From cf570c9a93428c079d9ac88eef452fadad78f55e Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Mon, 18 Dec 2017 11:04:40 +0100 Subject: [PATCH] Fix package error message fixes #5879 refs #5881 --- lib/remote/configpackageshandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/remote/configpackageshandler.cpp b/lib/remote/configpackageshandler.cpp index 48a624cf3..25ed7bafa 100644 --- a/lib/remote/configpackageshandler.cpp +++ b/lib/remote/configpackageshandler.cpp @@ -98,7 +98,9 @@ void ConfigPackagesHandler::HandlePost(const ApiUser::Ptr& user, HttpRequest& re boost::mutex::scoped_lock lock(ConfigPackageUtility::GetStaticMutex()); ConfigPackageUtility::CreatePackage(packageName); } catch (const std::exception& ex) { - HttpUtility::SendJsonError(response, 500, "Could not create package.", ""); + HttpUtility::SendJsonError(response, 500, "Could not create package.", + HttpUtility::GetLastParameter(params, "verboseErrors") ? DiagnosticInformation(ex) : ""); + return; } result1->Set("code", 200);