Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.0] Improve cleos error messages #1733

Merged
merged 3 commits into from
Oct 9, 2023
Merged

Conversation

heifner
Copy link
Member

@heifner heifner commented Oct 6, 2023

With the addition of #1137 different categories of plugins can be configured to different endpoints. Update cleos error message to provide a better suggestion when feature is not available at provided endpoint.

Example output:

./cleos -u http://127.0.0.1:8081 net peers
Error 3110004: Missing Net API Plugin
Ensure that you have eosio::net_api_plugin added to your node's configuration and enabled on the specified endpoint.
For example:
http-server-address   = http-category-address
http-category-address = net_ro,127.0.0.1:8081
http-category-address = net_rw,[::]:8083
Error Details:
Net API plugin is not enabled on specified endpoint

Also updated history_api_plugin error details:

./cleos -u http://127.0.0.1:8081 get transaction 13fccbfb5f484f23ea081c81ba3dc07cd1eb0ed13e084d5d9e26ddc8f9aa94d1
Error 3110003: Missing History API Plugin
The eosio::history_api_plugin has been removed. Verify endpoint simulates removed history_api_plugin or use a different option.
Error Details:
History API plugin is not enabled on specified endpoint

Resolves #1688

@heifner heifner requested review from linh2931 and greg7mdp October 6, 2023 19:19
@heifner heifner added the OCI Work exclusive to OCI team label Oct 6, 2023
@heifner heifner linked an issue Oct 6, 2023 that may be closed by this pull request
Copy link
Contributor

@greg7mdp greg7mdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice to provide an example of correct specification in the error message if possible.

@heifner
Copy link
Member Author

heifner commented Oct 6, 2023

I think it would be nice to provide an example of correct specification in the error message if possible.

I don't follow, can you give an example.

@greg7mdp
Copy link
Contributor

greg7mdp commented Oct 6, 2023

I think it would be nice to provide an example of correct specification in the error message if possible.

I don't follow, can you give an example.

Maybe something like the following, if I understand correctly the config:

Error 3110004: Missing Net API Plugin
Ensure that you have eosio::net_api_plugin added to your node's configuration and enabled on the specified endpoint. 
For example:
http-server-address   = http-category-address
http-category-address = net_ro,127.0.0.1:8081
http-category-address = net_rw,[::]:8083 

@heifner heifner merged commit 7077e89 into release/5.0 Oct 9, 2023
@heifner heifner deleted the GH-1688-cleos-err-5.0 branch October 9, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cleos error message missleading in 5.0
3 participants