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

Create sdk.Result from any error type #4849

Merged
merged 3 commits into from
Aug 5, 2019

Conversation

ethanfrey
Copy link
Contributor

Implements the first part of #4844 (the non-breaking enhancement to transform any error into a Result). Maintain the current log format (json) and types/errors behaves almost identical to sdk error (just a bit more info in log, via Wrap).

I can add a clog entry if needed, but this is really just internal code to support later refactoring. Just wanted to do it while I still had the types/errors package in my head.

  • Targeted PR against correct branch (see CONTRIBUTING.md)

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.

  • Wrote tests

  • Updated relevant documentation (docs/)

  • Added a relevant changelog entry: clog add [section] [-t <tag>] [-m <msg>]

  • Re-reviewed Files changed in the github PR explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Aug 5, 2019

Codecov Report

Merging #4849 into master will increase coverage by 0.05%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #4849      +/-   ##
==========================================
+ Coverage   54.11%   54.17%   +0.05%     
==========================================
  Files         269      269              
  Lines       17216    17226      +10     
==========================================
+ Hits         9317     9332      +15     
+ Misses       7209     7204       -5     
  Partials      690      690

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ⚡️

@alexanderbez alexanderbez merged commit a73b3f5 into cosmos:master Aug 5, 2019
@ethanfrey ethanfrey deleted the confio/result-from-error branch August 6, 2019 08:30
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

Successfully merging this pull request may close these issues.

2 participants