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

types/rest: convenience functions for error checking #5900

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

alessio
Copy link
Contributor

@alessio alessio commented Mar 31, 2020

Closes: #XXX

Description


For contributor use:

  • 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.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

Merging #5900 into master will increase coverage by 0.05%.
The diff coverage is 53.84%.

@@            Coverage Diff             @@
##           master    #5900      +/-   ##
==========================================
+ Coverage   56.99%   57.04%   +0.05%     
==========================================
  Files         342      342              
  Lines       20060    20056       -4     
==========================================
+ Hits        11433    11441       +8     
+ Misses       7782     7770      -12     
  Partials      845      845              

@alessio alessio force-pushed the alessio/rest-error-checking branch 2 times, most recently from 8225058 to c0455fe Compare March 31, 2020 22:53
@alessio alessio changed the title Alessio/rest error checking types/rest: add convenience functions for error checking Mar 31, 2020
@alessio alessio changed the title types/rest: add convenience functions for error checking types/rest: convenience functions for error checking Mar 31, 2020
@alessio alessio force-pushed the alessio/rest-error-checking branch from c0455fe to 9457da7 Compare March 31, 2020 22:56
@alessio alessio force-pushed the alessio/rest-error-checking branch from 9457da7 to 7e2476c Compare March 31, 2020 22:59
@alessio alessio added the R4R label Mar 31, 2020
@alessio alessio marked this pull request as ready for review March 31, 2020 22:59
@alessio alessio added the REST label Mar 31, 2020
@jgimeno
Copy link
Contributor

jgimeno commented Mar 31, 2020

A way to make people use this can be to update the scaffold tool here:

https://github.com/cosmos/scaffold/blob/master/templates/module/client/rest/query.go.tmpl
and
https://github.com/cosmos/scaffold/blob/master/templates/module/client/rest/tx.go.tmpl

if not I think will be difficult for people to discover this function exists.

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.

LGTM

@alexanderbez
Copy link
Contributor

@jgimeno keep in mind, a large part of that REST boostrapping logic will change with gRPC/Proto. See ADR 021.

@alessio alessio merged commit ca19fbc into master Apr 1, 2020
@alessio alessio deleted the alessio/rest-error-checking branch April 1, 2020 07:50
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.

3 participants