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

R4R: Standardize REST error responses #2444

Merged
merged 23 commits into from
Oct 19, 2018
Merged

Conversation

fedekunze
Copy link
Collaborator

@fedekunze fedekunze commented Oct 5, 2018

Closes #2445


  • 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 entries in PENDING.md with issue #

  • 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 Oct 5, 2018

Codecov Report

Merging #2444 into develop will decrease coverage by 0.01%.
The diff coverage is 5.4%.

@@             Coverage Diff             @@
##           develop    #2444      +/-   ##
===========================================
- Coverage     57.9%   57.88%   -0.02%     
===========================================
  Files          140      140              
  Lines         8119     8119              
===========================================
- Hits          4701     4700       -1     
- Misses        3121     3122       +1     
  Partials       297      297

return
}
if m.Password == "" {
msg = "You have to specify a password for the locally stored account."
Copy link
Member

Choose a reason for hiding this comment

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

Whats the benefit of storing this in a variable?

Copy link
Member

@jackzampolin jackzampolin left a comment

Choose a reason for hiding this comment

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

This is HUGE!

@jackzampolin
Copy link
Member

When do you expect this out of WIP status @fedekunze ?

@fedekunze fedekunze changed the title WIP: Standardize REST error responses R4R: Standardize REST error responses Oct 12, 2018
@jackzampolin
Copy link
Member

Lets try to get this in for 0.25 🤞

@cwgoes
Copy link
Contributor

cwgoes commented Oct 12, 2018

Fix lint please.

Federico Kunze added 2 commits October 12, 2018 17:53
@fedekunze
Copy link
Collaborator Author

@cwgoes passing all tests now

@fedekunze
Copy link
Collaborator Author

@cwgoes opened tendermint/tendermint#2643

client/keys/add.go Outdated Show resolved Hide resolved
types/errors.go Outdated Show resolved Hide resolved
@fedekunze
Copy link
Collaborator Author

The current response is the following

"{\"codespace\":1,\"code\":1,\"abci_code\":65537,\"message\":\"something unexpected happened; Error{internal error}\"}"

it should change once we update to newest Tm version:

"{\"codespace\":1,\"code\":1,\"abci_code\":65537,\"message\":\"something unexpected happened; internal error\"}"

@fedekunze
Copy link
Collaborator Author

@cwgoes should be ready for final review

@jackzampolin
Copy link
Member

This is great! Would love to get this in for 0.25 @cwgoes

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

utACK, thanks @fedekunze, much cleaner.

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.

4 participants