4#include "web/ng/Request.hpp"
5#include "web/ng/Response.hpp"
7#include <boost/beast/http/status.hpp>
8#include <boost/json/object.hpp>
9#include <boost/json/serialize.hpp>
10#include <fmt/format.h>
11#include <xrpl/protocol/ErrorCodes.h>
12#include <xrpl/protocol/jss.h>
17namespace web::ng::impl {
23 std::reference_wrapper<Request const> rawRequest_;
24 std::optional<boost::json::object> request_;
35 std::optional<boost::json::object> request = std::nullopt
85 [[nodiscard]] boost::json::object
94 [[nodiscard]] boost::json::object
Represents an HTTP or WebSocket request.
Definition Request.hpp:18
Represents an HTTP or Websocket response.
Definition Response.hpp:21
Response makeTooBusyError() const
Make a response for when the server is too busy.
Definition ErrorHandling.cpp:126
boost::json::object composeError(rpc::Status const &error) const
Compose an error into json object from a status.
Definition ErrorHandling.cpp:158
Response makeJsonParsingError() const
Make a response when json parsing fails.
Definition ErrorHandling.cpp:144
Response makeError(rpc::Status const &err) const
Make an error response from a status.
Definition ErrorHandling.cpp:62
Response makeNotReadyError() const
Make a response for when the server is not ready.
Definition ErrorHandling.cpp:120
Response makeInternalError() const
Make an internal error response.
Definition ErrorHandling.cpp:110
ErrorHelper(Request const &rawRequest, std::optional< boost::json::object > request=std::nullopt)
Construct a new Error Helper object.
Definition ErrorHandling.cpp:56
ripple::error_code_i RippledError
Clio uses compatible Rippled error codes for most RPC errors.
Definition Errors.hpp:54
A status returned from any RPC handler.
Definition Errors.hpp:65