diff --git a/arangod/RestHandler/RestShutdownHandler.cpp b/arangod/RestHandler/RestShutdownHandler.cpp index 900312fad947..78e331970423 100644 --- a/arangod/RestHandler/RestShutdownHandler.cpp +++ b/arangod/RestHandler/RestShutdownHandler.cpp @@ -98,7 +98,7 @@ RestStatus RestShutdownHandler::execute() { builder.add(VPackValue(true)); AgencyCommResult result = agency.setValue("Shutdown", builder.slice(), 0.0); if (!result.successful()) { - generateError(rest::ResponseCode::SERVER_ERROR, TRI_ERROR_HTTP_SERVER_ERROR); + generateError(result.asResult()); return RestStatus::DONE; } removeFromCluster = true; diff --git a/arangosh/Utils/ClientManager.cpp b/arangosh/Utils/ClientManager.cpp index 413d5cd3471f..e27b1e3bffed 100644 --- a/arangosh/Utils/ClientManager.cpp +++ b/arangosh/Utils/ClientManager.cpp @@ -25,6 +25,7 @@ #include "ClientManager.h" #include "ApplicationFeatures/ApplicationServer.h" +#include "Basics/StaticStrings.h" #include "Basics/VelocyPackHelper.h" #include "Basics/application-exit.h" #include "Logger/Logger.h" @@ -56,9 +57,11 @@ arangodb::Result getHttpErrorMessage(arangodb::httpclient::SimpleHttpResult* res std::shared_ptr parsedBody = result->getBodyVelocyPack(); VPackSlice const body = parsedBody->slice(); - auto serverCode = VelocyPackHelper::getNumericValue(body, "errorNum", 0); - std::string const& serverMessage = - VelocyPackHelper::getStringValue(body, "errorMessage", ""); + auto serverCode = + VelocyPackHelper::getNumericValue(body, arangodb::StaticStrings::ErrorNum, 0); + auto serverMessage = + VelocyPackHelper::getStringValue(body, arangodb::StaticStrings::ErrorMessage, + ""); if (serverCode > 0) { code = ErrorCode{serverCode};