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

imp: add not allowed keys to error message of authorization #5417

Merged
merged 4 commits into from
Dec 18, 2023

Conversation

crodriguezvega
Copy link
Contributor

Description

Follow up #5280. It adds the list of not allowed keys to the error.

closes: #XXXX

Commit Message / Changelog Entry

type: commit message

see the guidelines for commit messages. (view raw markdown for examples)


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 and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Comment on lines -179 to -181
if len(jsonObject) > len(allowedPacketDataList) {
return errorsmod.Wrapf(ErrInvalidAuthorization, "packet contains more packet data keys than packet allow list has")
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this because I thought it would not add much value if the error doesn't tell the user what keys are not allowed.

@codecov-commenter
Copy link

codecov-commenter commented Dec 14, 2023

Codecov Report

Merging #5417 (4a087b3) into main (60bbee1) will increase coverage by 0.02%.
Report is 9 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5417      +/-   ##
==========================================
+ Coverage   80.08%   80.11%   +0.02%     
==========================================
  Files         189      189              
  Lines       13142    13145       +3     
==========================================
+ Hits        10525    10531       +6     
+ Misses       2203     2201       -2     
+ Partials      414      413       -1     
Files Coverage Δ
...ules/apps/transfer/types/transfer_authorization.go 92.12% <100.00%> (+2.60%) ⬆️

@crodriguezvega crodriguezvega merged commit d270e75 into main Dec 18, 2023
60 checks passed
@crodriguezvega crodriguezvega deleted the carlos/return-not-allowed-keys-in-error branch December 18, 2023 20:01
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