Merge pull request #186 from bitshares/abitmore-patch-1

Return a user-friendly message on RPC execution error
This commit is contained in:
Abit 2020-02-24 18:49:17 +01:00 committed by GitHub
commit 5768c6d884
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 )