17 HandlerType
const& handler,
18 boost::json::value
const& value,
22 using boost::json::value_from;
26 "handler matches none of the branches below"
30 auto input = HandlerType::parseInput(value, ctx.apiVersion);
31 auto warnings = rpc::spec::toJsonArray(HandlerType::spec(ctx.apiVersion).check(value));
33 if (not input.has_value())
34 return ReturnType{
Error{std::move(input).error()}, std::move(warnings)};
36 auto ret = handler.process(*input, ctx);
38 if (not ret.has_value())
41 return ReturnType{value_from(std::move(ret).value()), std::move(warnings)};
46 auto const ret = handler.process(ctx);
47 if (not ret.has_value())