Skip to content

Commit

Permalink
Return a user-friendly msg on RPC execution error
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed Feb 24, 2020
1 parent 463380d commit 142b7eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rpc/websocket_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ response websocket_api_connection::on_request( const variant& var )
catch ( const fc::exception& e )
{
if( has_id )
return response( call.id, error_object{ e.code(), "Execution error", variant( e, _max_conversion_depth ) },
return response( call.id, error_object{ e.code(), "Execution error: " + e.to_string(),
variant( e, _max_conversion_depth ) },
call.jsonrpc );
}
catch ( const std::exception& e )
Expand Down

0 comments on commit 142b7eb

Please sign in to comment.