5#include <userver/formats/common/meta.hpp>
6#include <userver/formats/parse/to.hpp>
7#include <userver/http/status_code.hpp>
13template <formats::common::kIsFormatValue Value>
15 using IntType = std::underlying_type_t<
StatusCode>;
16 constexpr IntType kMinCode = 100;
17 constexpr IntType kMaxCode = 599;
19 const auto integer = value.
template As<IntType>();
20 if (integer < kMinCode || integer > kMaxCode) {
21 throw typename Value::Exception(fmt::format(
22 "StatusCode value {} out of [{}..{}] range at '{}'",