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

get_accounts API reports "no such account" error #1734

Closed
5 of 20 tasks
abitmore opened this issue Apr 24, 2019 · 5 comments
Closed
5 of 20 tasks

get_accounts API reports "no such account" error #1734

abitmore opened this issue Apr 24, 2019 · 5 comments
Labels
3d Bug Classification indicating the existing implementation does not match the intention of the design 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 API Impact flag identifying the application programing interface (API) 9b Small Effort estimation indicating TBD

Comments

@abitmore
Copy link
Member

abitmore commented Apr 24, 2019

Bug Description

  • get_accounts
  • get_full_accounts
  • get_assets

get_accounts API should return null if the account does not exist, but now it reports an error.

$ curl -d '{"id":1,"method":"call","params":["database","get_accounts",[["unexisting-account-should-return-null"]]]}' http://127.0.0.1:8090/ws
{"id":1,"jsonrpc":"2.0","error":{"code":1,"message":"Assert Exception: account: no such account","data":{"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"database_api.cpp","line":227,"method":"get_account_from_string","hostname":"","thread_name":"th_a","timestamp":"2019-04-24T22:45:47"},"format":"account: no such account","data":{}},{"context":{"level":"warn","file":"websocket_api.cpp","line":125,"method":"on_message","hostname":"","thread_name":"th_a","timestamp":"2019-04-24T22:45:47"},"format":"","data":{"call.method":"call","call.params":["database","get_accounts",[["unexisting-account-should-return-null"]]]}}]}}}

Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. 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)

CORE TEAM TASK LIST

  • Evaluate / Prioritize Bug Report
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@abitmore abitmore added 3d Bug Classification indicating the existing implementation does not match the intention of the design 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 API Impact flag identifying the application programing interface (API) 9b Small Effort estimation indicating TBD labels Apr 24, 2019
@abitmore abitmore added this to the 3.1.0 - Feature Release milestone Apr 24, 2019
@abitmore
Copy link
Member Author

get_assets API has the same issue.

@pmconrad
Copy link
Contributor

Do you think fixing this might break existing clients? @sschiessl-bcp ?

@abitmore
Copy link
Member Author

It was a bug introduced in a previous release. When querying for multiple accounts, if one account doesn't exist, the whole call fails. IMHO we should fix it.

@sschiessl-bcp
Copy link

Do you think fixing this might break existing clients? @sschiessl-bcp ?

Will check and get back, issue is opened

abitmore added a commit that referenced this issue May 24, 2019
@abitmore
Copy link
Member Author

Fixed by #1765.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3d Bug Classification indicating the existing implementation does not match the intention of the design 4b Normal Priority Priority indicating the moderate impact to system/user -OR- existing workaround is costly to perform 6 API Impact flag identifying the application programing interface (API) 9b Small Effort estimation indicating TBD
Projects
None yet
Development

No branches or pull requests

4 participants