3#include <userver/formats/json/value.hpp>
4#include <userver/http/content_type.hpp>
6#include <userver/server/handlers/exceptions.hpp>
7#include <userver/server/http/http_status.hpp>
11namespace server::handlers {
17 static constexpr bool kIsExternalBodyFormatted =
true;
21 LegacyJsonErrorBuilder(
http::HttpStatus status, std::string internal_message, std::string external_error_body);
23 LegacyJsonErrorBuilder(
24 http::HttpStatus status,
25 std::string internal_message,
26 std::string external_error_body,
30 const std::string& GetInternalMessage()
const {
return internal_message_; };
32 const std::string& GetExternalBody()
const {
return json_error_body_; }
35 return USERVER_NAMESPACE::
http::content_type::kApplicationJson;
39 std::string internal_message_;
40 std::string json_error_body_;