feat: More verbose forwarding errors (#1523)

Fixes #1516.
This commit is contained in:
Sergey Kuznetsov
2024-07-09 15:22:01 +01:00
committed by GitHub
parent 094ed8f299
commit 46bd67a9ec
19 changed files with 176 additions and 53 deletions

View File

@@ -19,6 +19,7 @@
#pragma once
#include "rpc/Errors.hpp"
#include "util/FakeFetchResponse.hpp"
#include <boost/asio/spawn.hpp>
@@ -28,6 +29,7 @@
#include <gmock/gmock.h>
#include <cstdint>
#include <expected>
#include <optional>
#include <string>
@@ -37,8 +39,10 @@ struct MockLoadBalancer {
MOCK_METHOD(void, loadInitialLedger, (std::uint32_t, bool), ());
MOCK_METHOD(std::optional<FakeFetchResponse>, fetchLedger, (uint32_t, bool, bool), ());
MOCK_METHOD(boost::json::value, toJson, (), (const));
using ForwardToRippledReturnType = std::expected<boost::json::object, rpc::ClioError>;
MOCK_METHOD(
std::optional<boost::json::object>,
ForwardToRippledReturnType,
forwardToRippled,
(boost::json::object const&, std::optional<std::string> const&, bool, boost::asio::yield_context),
(const)