]> granicus.if.org Git - icinga2/commitdiff
Fix error handling on config package delete
authorMichael Friedrich <michael.friedrich@icinga.com>
Thu, 12 Apr 2018 17:24:08 +0000 (19:24 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Thu, 12 Apr 2018 17:24:08 +0000 (19:24 +0200)
lib/remote/configpackageshandler.cpp

index 2ecf78d4ccc0e7d7bc65613e2806081783555eca..8ad25d0cb50f6a3807819d2f20876e589e4e76af 100644 (file)
@@ -135,12 +135,13 @@ void ConfigPackagesHandler::HandleDelete(const ApiUser::Ptr& user, HttpRequest&
        } catch (const std::exception& ex) {
                HttpUtility::SendJsonError(response, params, 500, "Failed to delete package '" + packageName + "'.",
                        DiagnosticInformation(ex));
+               return;
        }
 
        Dictionary::Ptr result1 = new Dictionary({
                { "code", 200 },
                { "package", packageName },
-               { "status", "Created package." }
+               { "status", "Deleted package." }
        });
 
        Dictionary::Ptr result = new Dictionary({