The node info command extracts various information from the node. Some of it requires information from admin_nodeInfo JSON-RPC endpoint.
But this admin endpoint may not always be enabled, especially in public nodes. In this case, calling node info will throw an exception:
$ admin node info
web3.exceptions.MethodUnavailable: {'code': -32601, 'message': 'the method admin_nodeInfo does not exist/is not available'}
Instead of failing due to error, the command should just display all available information. The help text should be updated to mention the admin API requirement. In the worst case a warning message could be shown on stderr that not all data could be queried, but this does not seem absolutely necessary.
The
node info
command extracts various information from the node. Some of it requires information fromadmin_nodeInfo
JSON-RPC endpoint.But this
admin
endpoint may not always be enabled, especially in public nodes. In this case, callingnode info
will throw an exception:Instead of failing due to error, the command should just display all available information. The help text should be updated to mention the
admin
API requirement. In the worst case a warning message could be shown on stderr that not all data could be queried, but this does not seem absolutely necessary.