|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
Base class of every error raised while sending a REST request. More...
#include <errors.hpp>
Public Member Functions | |
| ConnectorError (const std::string &what, std::string msg, std::optional< std::int64_t > code=std::nullopt) | |
| const RawResponse * | response () const noexcept |
| The HTTP response that caused the error, when there was one: status, headers (e.g. | |
| std::optional< std::chrono::seconds > | retry_after () const noexcept |
| The delay from the Retry-After header of a 418 / 429 response, if it has one. | |
| Public Member Functions inherited from binance::common::Error | |
| Error (const std::string &what, std::string msg, std::optional< std::int64_t > code=std::nullopt) | |
| const std::string & | msg () const noexcept |
| std::optional< std::int64_t > | code () const noexcept |
Friends | |
| struct | detail::ErrorAccess |
Base class of every error raised while sending a REST request.
| binance::common::ConnectorError::ConnectorError | ( | const std::string & | what, |
| std::string | msg, | ||
| std::optional< std::int64_t > | code = std::nullopt ) |
|
inlinenodiscardnoexcept |
The HTTP response that caused the error, when there was one: status, headers (e.g.
retry-after on 418 / 429), parsed rate limits and the raw body. nullptr otherwise.
|
nodiscardnoexcept |
The delay from the Retry-After header of a 418 / 429 response, if it has one.
Only the delay-seconds form is read: an HTTP-date, a negative or a non-numeric value gives nullopt, as does any other error.
|
friend |