Skip to content

Commit

Permalink
Merge pull request #219 from AntelopeIO/GH-186-std-except-debug-log
Browse files Browse the repository at this point in the history
[3.2] Log std::exception while handling API calls at debug level
  • Loading branch information
heifner authored Sep 23, 2022
2 parents da1d88c + a73b523 commit b288dac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/http_plugin/http_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,8 @@ class http_plugin_impl : public std::enable_shared_from_this<http_plugin_impl> {
} catch (std::exception& e) {
error_results results{500, "Internal Service Error", error_results::error_info(fc::exception( FC_LOG_MESSAGE( error, e.what())), verbose_http_errors)};
cb( 500, fc::time_point::maximum(), fc::variant( results ));
fc_elog( logger(), "STD Exception encountered while processing ${api}.${call}",
("api", api_name)( "call", call_name ) );
fc_dlog( logger(), "Exception Details: ${e}", ("e", e.what()) );
fc_dlog( logger(), "STD Exception encountered while processing ${api}.${call}: ${e}",
("api", api_name)("call", call_name)("e", e.what()) );
} catch (...) {
error_results results{500, "Internal Service Error",
error_results::error_info(fc::exception( FC_LOG_MESSAGE( error, "Unknown Exception" )), verbose_http_errors)};
Expand Down

0 comments on commit b288dac

Please sign in to comment.