From 86987245729f95dc1b944333d3cc9ba668f4b410 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Tue, 25 Jul 2023 15:16:44 -0500 Subject: [PATCH] GH-1433 rethrow exception so API can report error to user --- plugins/trace_api_plugin/trace_api_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/trace_api_plugin/trace_api_plugin.cpp b/plugins/trace_api_plugin/trace_api_plugin.cpp index adb9534f2b..28419bf2c5 100644 --- a/plugins/trace_api_plugin/trace_api_plugin.cpp +++ b/plugins/trace_api_plugin/trace_api_plugin.cpp @@ -202,6 +202,9 @@ struct trace_api_rpc_plugin_impl : public std::enable_shared_from_this data_handler = std::make_shared([](const exception_with_context& e){ log_exception(e, fc::log_level::debug); + if (std::get<0>(e)) { // rethrow so caller is notified of error + std::rethrow_exception(std::get<0>(e)); + } }); if( options.count("trace-rpc-abi") ) {