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,
22 std::string external_error_body);
24 LegacyJsonErrorBuilder(http::
HttpStatus status, std::string internal_message,
25 std::string external_error_body,
26 const formats::
json::Value& details);
28 const std::string& GetInternalMessage()
const {
return internal_message_; };
30 const std::string& GetExternalBody()
const {
return json_error_body_; }
32 static const USERVER_NAMESPACE::http::
ContentType& GetContentType() {
33 return USERVER_NAMESPACE::http::content_type::kApplicationJson;
37 std::string internal_message_;
38 std::string json_error_body_;