Skip to content

Commit d09b653

Browse files
authored
Return a user-friendly msg on RPC execution error
1 parent 3970ca1 commit d09b653

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rpc/websocket_api.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ response websocket_api_connection::on_request( const variant& var )
221221
catch ( const fc::exception& e )
222222
{
223223
if( has_id )
224-
return response( call.id, error_object{ e.code(), "Execution error", variant( e, _max_conversion_depth ) },
224+
return response( call.id, error_object{ e.code(), "Execution error: " + e.to_string(),
225+
variant( e, _max_conversion_depth ) },
225226
call.jsonrpc );
226227
}
227228
catch ( const std::exception& e )

0 commit comments

Comments
 (0)