{std::string("/v1/" #api_name "/" #call_name), \
[api_handle](string, string body, url_response_callback cb) mutable { \
api_handle.validate(); \
try { \
auto params = parse_params<api_namespace::call_name ## _params, params_type>(body);\
api_handle.call_name( std::move(
params),\
[cb, body](const std::variant<fc::exception_ptr, call_result>& result){\
if (std::holds_alternative<fc::exception_ptr>(result)) {\
try {\
std::get<fc::exception_ptr>(result)->dynamic_rethrow_exception();\
} catch (...) {\
http_plugin::handle_exception(#api_name, #call_name, body, cb);\
}\
} else {\
cb(http_response_code, std::visit(async_result_visitor(), result));\
}\
});\
} catch (...) { \
http_plugin::handle_exception(#api_name, #call_name, body, cb); \
} \
}\
}
account_query_db::get_accounts_by_authorizers_params params
64#define CALL_ASYNC_WITH_400(api_name, api_handle, api_namespace, call_name, call_result, http_response_code, params_type) \
65{std::string("/v1/" #api_name "/" #call_name), \
66 [api_handle](string, string body, url_response_callback cb) mutable { \
67 api_handle.validate(); \
68 try { \
69 auto params = parse_params<api_namespace::call_name ## _params, params_type>(body);\
70 api_handle.call_name( std::move(params),\
71 [cb, body](const std::variant<fc::exception_ptr, call_result>& result){\
72 if (std::holds_alternative<fc::exception_ptr>(result)) {\
73 try {\
74 std::get<fc::exception_ptr>(result)->dynamic_rethrow_exception();\
75 } catch (...) {\
76 http_plugin::handle_exception(#api_name, #call_name, body, cb);\
77 }\
78 } else {\
79 cb(http_response_code, std::visit(async_result_visitor(), result));\
80 }\
81 });\
82 } catch (...) { \
83 http_plugin::handle_exception(#api_name, #call_name, body, cb); \
84 } \
85 }\
86}