8000 Feature/minor cleanup by goedderz · Pull Request #14661 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Feature/minor cleanup #14661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 26, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use StaticStrings
  • Loading branch information
goedderz committed Aug 18, 2021
commit 2b882db02873e2a3cbe009396cc0f2a9673e2d92
9 changes: 6 additions & 3 deletions arangosh/Utils/ClientManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -56,9 +57,11 @@ arangodb::Result getHttpErrorMessage(arangodb::httpclient::SimpleHttpResult* res
std::shared_ptr<VPackBuilder> parsedBody = result->getBodyVelocyPack();
VPackSlice const body = parsedBody->slice();

auto serverCode = VelocyPackHelper::getNumericValue<int>(body, "errorNum", 0);
std::string const& serverMessage =
VelocyPackHelper::getStringValue(body, "errorMessage", "");
auto serverCode =
VelocyPackHelper::getNumericValue<int>(body, arangodb::StaticStrings::ErrorNum, 0);
auto serverMessage =
VelocyPackHelper::getStringValue(body, arangodb::StaticStrings::ErrorMessage,
"");

if (serverCode > 0) {
code = ErrorCode{serverCode};
Expand Down
0