A helper that attempts to match rippled reporting mode HTTP errors as close as possible.
More...
#include <ErrorHandling.hpp>
A helper that attempts to match rippled reporting mode HTTP errors as close as possible.
◆ ErrorHelper()
| web::ng::impl::ErrorHelper::ErrorHelper |
( |
Request const & | rawRequest, |
|
|
std::optional< boost::json::object > | request = std::nullopt ) |
Construct a new Error Helper object.
- Parameters
-
| rawRequest | The request that caused the error. |
| request | The parsed request that caused the error. |
◆ composeError() [1/2]
| boost::json::object web::ng::impl::ErrorHelper::composeError |
( |
rpc::RippledError | error | ) |
const |
|
nodiscard |
Compose an error into json object from a rippled error.
- Parameters
-
| error | The rippled error to compose into a json object. |
- Returns
- The composed json object.
◆ composeError() [2/2]
| boost::json::object web::ng::impl::ErrorHelper::composeError |
( |
rpc::Status const & | error | ) |
const |
|
nodiscard |
Compose an error into json object from a status.
- Parameters
-
| error | The status to compose into a json object. |
- Returns
- The composed json object.
◆ makeError()
Make an error response from a status.
- Parameters
-
| err | The status to make an error response from. |
- Returns
◆ makeInternalError()
| Response web::ng::impl::ErrorHelper::makeInternalError |
( |
| ) |
const |
|
nodiscard |
Make an internal error response.
- Returns
- A response with an internal error.
◆ makeJsonParsingError()
| Response web::ng::impl::ErrorHelper::makeJsonParsingError |
( |
| ) |
const |
|
nodiscard |
Make a response when json parsing fails.
- Returns
- A response with a json parsing error.
◆ makeNotReadyError()
| Response web::ng::impl::ErrorHelper::makeNotReadyError |
( |
| ) |
const |
|
nodiscard |
Make a response for when the server is not ready.
- Returns
- A response with a not ready error.
◆ makeTooBusyError()
| Response web::ng::impl::ErrorHelper::makeTooBusyError |
( |
| ) |
const |
|
nodiscard |
Make a response for when the server is too busy.
- Returns
- A response with a too busy error.
The documentation for this class was generated from the following files:
- /__w/clio/clio/src/web/ng/impl/ErrorHandling.hpp
- /__w/clio/clio/src/web/ng/impl/ErrorHandling.cpp