#include <userver/server/http/http_error.hpp>
An extension of server::handlers::CustomHandlerException that allows to specify a custom HttpStatus.
For non-HTTP protocols, the status code will be derived from the attached server::handlers::HandlerErrorCode.
Definition at line 36 of file http_error.hpp.
Public Types | |
using | HandlerErrorCode = handlers::HandlerErrorCode |
using | ServiceErrorCode = handlers::ServiceErrorCode |
using | InternalMessage = handlers::InternalMessage |
using | ExternalBody = handlers::ExternalBody |
using | ExtraHeaders = handlers::ExtraHeaders |
Public Member Functions | |
template<typename... Args> | |
CustomHandlerException (handlers::HandlerErrorCode error_code, HttpStatus http_status, Args &&... args) | |
HttpStatus | GetHttpStatus () const |
HandlerErrorCode | GetCode () const |
const std::string & | GetServiceCode () const |
bool | IsExternalErrorBodyFormatted () const |
const std::string & | GetExternalErrorBody () const |
const formats::json::Value & | GetDetails () const |
const Headers & | GetExtraHeaders () const |
|
inherited |
Definition at line 206 of file exceptions.hpp.
|
inherited |
Definition at line 207 of file exceptions.hpp.
|
inherited |
Definition at line 203 of file exceptions.hpp.
|
inherited |
Definition at line 205 of file exceptions.hpp.
|
inherited |
Definition at line 204 of file exceptions.hpp.
|
inline |
args
that can augment error messages. Definition at line 42 of file http_error.hpp.
|
inlineinherited |
Definition at line 286 of file exceptions.hpp.
|
inlineinherited |
Definition at line 294 of file exceptions.hpp.
|
inlineinherited |
Definition at line 292 of file exceptions.hpp.
|
inlineinherited |
Definition at line 296 of file exceptions.hpp.
|
inline |
Definition at line 45 of file http_error.hpp.
|
inlineinherited |
Definition at line 288 of file exceptions.hpp.
|
inlineinherited |
Definition at line 290 of file exceptions.hpp.