23#include "web/ng/Request.hpp"
24#include "web/ng/Response.hpp"
26#include <boost/beast/http/status.hpp>
27#include <boost/json/object.hpp>
28#include <boost/json/serialize.hpp>
30#include <xrpl/protocol/ErrorCodes.h>
31#include <xrpl/protocol/jss.h>
36namespace web::ng::impl {
42 std::reference_wrapper<Request const> rawRequest_;
43 std::optional<boost::json::object> request_;
52 ErrorHelper(
Request const& rawRequest, std::optional<boost::json::object> request = std::nullopt);
101 [[nodiscard]] boost::json::object
110 [[nodiscard]] boost::json::object
Represents an HTTP or WebSocket request.
Definition Request.hpp:37
Represents an HTTP or Websocket response.
Definition Response.hpp:40
A helper that attempts to match rippled reporting mode HTTP errors as close as possible.
Definition ErrorHandling.hpp:41
Response makeTooBusyError() const
Make a response for when the server is too busy.
Definition ErrorHandling.cpp:133
boost::json::object composeError(rpc::Status const &error) const
Definition ErrorHandling.cpp:153
Response makeJsonParsingError() const
Make a response when json parsing fails.
Definition ErrorHandling.cpp:143
Response makeError(rpc::Status const &err) const
Make an error response from a status.
Definition ErrorHandling.cpp:77
Response makeNotReadyError() const
Make a response for when the server is not ready.
Definition ErrorHandling.cpp:127
Response makeInternalError() const
Make an internal error response.
Definition ErrorHandling.cpp:121
ErrorHelper(Request const &rawRequest, std::optional< boost::json::object > request=std::nullopt)
Construct a new Error Helper object.
Definition ErrorHandling.cpp:71
ripple::error_code_i RippledError
Clio uses compatible Rippled error codes for most RPC errors.
Definition Errors.hpp:71
A status returned from any RPC handler.
Definition Errors.hpp:82