diff --git a/arangod/Replication/ReplicationFeature.cpp b/arangod/Replication/ReplicationFeature.cpp index 9c73617ae0..56fe0be51a 100644 --- a/arangod/Replication/ReplicationFeature.cpp +++ b/arangod/Replication/ReplicationFeature.cpp @@ -173,6 +173,8 @@ static std::string FixEndpointProto(std::string const& endpoint) { } static void writeError(int code, GeneralResponse* response) { + response->setResponseCode(GeneralResponse::responseCode(code)); + VPackBuffer buffer; VPackBuilder builder(buffer); try { @@ -191,7 +193,6 @@ static void writeError(int code, GeneralResponse* response) { } } - /// @brief fill a response object with correct response for a follower void ReplicationFeature::prepareFollowerResponse(GeneralResponse* response, arangodb::ServerState::Mode mode) { @@ -226,6 +227,7 @@ void ReplicationFeature::prepareFollowerResponse(GeneralResponse* response, break; case ServerState::Mode::MAINTENANCE: default: { + response->setResponseCode(rest::ResponseCode::SERVICE_UNAVAILABLE); break; } }