Return a user-friendly msg on RPC execution error

This commit is contained in:
Abit 2020-02-21 12:52:25 +01:00 committed by abitmore
parent 463380d64a
commit 142b7eb4c6

View file

@ -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 )