Skip to content

Commit

Permalink
GH-186 Log std::exception for http calls at debug level.
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Sep 23, 2022
1 parent da1d88c commit a73b523
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 a73b523

Please sign in to comment.