3#include <userver/formats/json/value.hpp>
4#include <userver/http/content_type.hpp>
6#include <userver/server/handlers/exceptions.hpp>
10namespace server::handlers {
16 static constexpr bool kIsExternalBodyFormatted =
true;
20 JsonErrorBuilder(std::string_view error_code, std::string internal_message,
21 std::string_view external_error_body,
22 formats::
json::Value = {});
24 const std::string& GetInternalMessage()
const {
return internal_message_; };
26 const std::string& GetExternalBody()
const {
return json_error_body_; }
28 static const USERVER_NAMESPACE::http::
ContentType& GetContentType() {
29 return USERVER_NAMESPACE::http::content_type::kApplicationJson;
33 std::string internal_message_;
34 std::string json_error_body_;