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

Market keeper's errors are not received by emd #144

Open
haasted opened this issue Sep 22, 2021 · 1 comment
Open

Market keeper's errors are not received by emd #144

haasted opened this issue Sep 22, 2021 · 1 comment
Assignees

Comments

@haasted
Copy link
Collaborator

haasted commented Sep 22, 2021

Describe the bug

The market module keeper is rather diligent about returning informative errors to the user. Unfortunately, the error messages are lost in transmission and replaced with messages such as failed to execute message; message index: 0.

How to reproduce

Create an order with a non-existing asset on one side:

emd tx market add-limit 10000500bobs 5000000ungm orderid15 --from key1 --fees 200000ungm

The resulting output is something like:
{"height":"23746","txhash":"C90F800465460C171F1FB2CD2B3310D2315CF79328B0B37A9BFDC3468D0F619B","codespace":"market","code":1,"data":"","raw_log":"internal","logs":[],"info":"","gas_wanted":"200000","gas_used":"75742","tx":null,"timestamp":""}

My guess is that the actual error should be about an insufficient balance of bobs, but it could be that it's caught in an earlier check. Would be nice to have a more informative error message than code: 1.

@haasted haasted assigned haasted and blewater and unassigned haasted Sep 22, 2021
@blewater
Copy link
Contributor

On the develop branch it appears to return a meaningful error:
... failed to execute message; message index: 0: Account 44B8D0F558DB9AAF6242CC03C55AE36115CB4B3A has insufficient balance to execute trade: 100000000000echf,3500000000000edkk,100000000000eeur,3500000000000ejpy,3500000000000enok,3500000000000esek,990000000000ungm \u003c 50000bobs: insufficient account balance","logs":[],"info":"","gas_wanted":"200000","gas_used":"69705","tx":null,"timestamp":""}

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