lukechilds / hyperdex-bugtracker

0 stars 1 forks source link

Improve Error Reporting #6

Closed jansako closed 6 years ago

jansako commented 6 years ago

When trying to execute a trade and only having one UTXO, OR trying to sell less than 10% of a UTXO (I can't tell which cause the message is unclear :-) ), I get a 'something unexpected happened'.

image

Suggestion: message should be clear on next steps.

lukechilds commented 6 years ago

Thanks for reporting @jansako

The error messages are provided to us directly from marketmaker. We agree they are not that clear and have made attempts to make some of them more obvious.

However unfortunately we don't get any error codes, only error messages, so it's very fragile for us to try and handle these manually. If the error message text from marketmaker ever gets changed in the future it will break all of our error handling code.

There are also some cases where we get not error code or error message, we just have missing properties in the response and have to guess what went wrong, like in the case with this error:

// TODO: Temp workaround for marketmaker issue
if (!result.pending) {
  this.setState({statusMessage: 'Something unexpected happened. Are you sure you have enough UTXO?'});
  return;
}

We need marketmaker to support error codes before we can reliably improve error handling but it is on our list to do.

More info in this issue: https://github.com/jl777/SuperNET/issues/717

Please give it a thumbs up if it's something you'd like to see fixed.

sindresorhus commented 6 years ago

Moved to https://github.com/lukechilds/hyperdex/issues/280