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

chore: ics29 error returns on fee validation #1235

Closed
wants to merge 1 commit into from

Conversation

damiannolan
Copy link
Member

Description

  • Return errors immediately as opposed to appending them

closes: #1234


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • 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
  • Review Codecov Report in the comment section below once CI passes

@codecov-commenter
Copy link

Codecov Report

Merging #1235 (ba2196c) into main (311379f) will decrease coverage by 0.05%.
The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1235      +/-   ##
==========================================
- Coverage   80.05%   80.00%   -0.06%     
==========================================
  Files         166      166              
  Lines       11910    11906       -4     
==========================================
- Hits         9535     9525      -10     
- Misses       1914     1918       +4     
- Partials      461      463       +2     
Impacted Files Coverage Δ
modules/apps/29-fee/types/fee.go 69.38% <25.00%> (-13.64%) ⬇️

@seantking
Copy link
Contributor

I think we should leave this as is. In the case that more than one fee is invalid it would be good to include that in the error message.

I left a comment on fedes comment also : #276 (comment)

@crodriguezvega
Copy link
Contributor

Yes, I also agree that we should leave it as is. I think it's better UX when you get error messages for all the things that you might have wrong at once, instead of executing each time the command and getting only the next error message.

@damiannolan
Copy link
Member Author

Sounds good, in which case I'll close this PR and the issue!

@damiannolan damiannolan closed this Apr 9, 2022
@colin-axner
Copy link
Contributor

colin-axner commented Apr 11, 2022

My only concern with the agreed upon decision is that this is not how the SDK functions. The SDK does not batch up all errors in a message execution. Given that this error appending is self-contained in fee.Validate(), it seems fine, although I have a slight preference for not appending the errors. This error should be returned before a transaction is broadcasted so fixing errors one at a time seems simpler

@damiannolan damiannolan deleted the damian/1234-fee-validation-errs branch August 3, 2022 12:40
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.

ics29 fee validation: return errors immediately
5 participants