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

Check if required plugins are enabled in history APIs #2021

Closed
1 of 17 tasks
abitmore opened this issue Oct 7, 2019 · 3 comments
Closed
1 of 17 tasks

Check if required plugins are enabled in history APIs #2021

abitmore opened this issue Oct 7, 2019 · 3 comments

Comments

@abitmore
Copy link
Member

abitmore commented Oct 7, 2019

User Story
As an API user I want to see clearer error messages when calling APIs from nodes that didn't enable required plugins:

  • get_fill_order_history
  • get_market_history
    * other related APIs?

Impacts
Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

Additional Context (optional)
Add any other context about your request here.

CORE TEAM TASK LIST

  • Evaluate / Prioritize Feature Request
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@jmjatlanta
Copy link
Contributor

Related #1070

@abitmore
Copy link
Member Author

abitmore commented Oct 8, 2019

This ticket was just for adding a FC_ASSERT at the entrance of the API calls to avoid seeing error messages like this:

unlocked >>> get_market_history BTS USD 3600 "2019-09-01T00:00:00" "2019-10-02T00:00:00"
0 exception: unspecified
Execution error
{"error":"Execution error","data":{"id":13,"error":{"code":10,"message":"Execution error","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"object_database.cpp","line":57,"method":"get_index","hostname":"","thread_name":"th_a","timestamp":"2019-10-07T07:18:58"},"format":"_index[space_id].size() > type_id: ","data":{"space_id":5,"type_id":1,"index[space_id].size":0}},{"context":{"level":"warn","file":"api.cpp","line":502,"method":"get_market_history","hostname":"","thread_name":"th_a","timestamp":"2019-10-07T07:18:58"},"format":"","data":{"asset_a":"BTS","asset_b":"USD","bucket_seconds":3600,"start":"2019-09-01T00:00:00","end":"2019-10-02T00:00:00"}}]}}}}
th_a state.cpp:39 handle_reply

Ideally I'd refactor the API classes, adopt the _has_market_history_plugin approach done in database_api to improve performance a bit, however it's not a priority for me right now.

#1070 is more generic.

@abitmore
Copy link
Member Author

abitmore commented Jun 4, 2020

Fixed by #2158.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants