As a developer using steem-ruby, I would like steem-ruby to handle errors from hivemind backed nodes, so that I can debug my apps easier.
This change does two things:
It updates the tests so that if a node is backed by hivemind, and thus disables tags_api and follow_api, the tests that rely on those plugins are just skipped.
It handles and whitelists hivemind specific errors so that these tests pass.
Before this change, but after api.steemit.com changed configuration to include hivemind backed methods, the previous revision would have the following errors when running the test suite (e.g., running the command bundle exec rake test):
For these tests, after this revision, the errors all pass when using the default production node.
Application Impact
When whitelisting errors, this just means steem-ruby will not raise Steem::UnknownError but will raise more meaningful errors, like Steem::ArgumentError or Steem::HivemindArgumentError (which itself descends from Steem::ArgumentError).
To achieve this, steem-ruby will now conditionally check the response for the .error key (like before) or the .result.error key, if the error originates from hivemind.
As a developer using steem-ruby, I would like steem-ruby to handle errors from hivemind backed nodes, so that I can debug my apps easier.
This change does two things:
tags_api
andfollow_api
, the tests that rely on those plugins are just skipped.Before this change, but after
api.steemit.com
changed configuration to include hivemind backed methods, the previous revision would have the following errors when running the test suite (e.g., running the commandbundle exec rake test
):For these tests, after this revision, the errors all pass when using the default production node.
Application Impact
When whitelisting errors, this just means steem-ruby will not raise
Steem::UnknownError
but will raise more meaningful errors, likeSteem::ArgumentError
orSteem::HivemindArgumentError
(which itself descends fromSteem::ArgumentError
).To achieve this, steem-ruby will now conditionally check the response for the
.error
key (like before) or the.result.error
key, if the error originates from hivemind.