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

improvement: added module names in channel callback errors #2387

Conversation

alizahidraja
Copy link
Contributor

@alizahidraja alizahidraja commented Sep 26, 2022

Description

Included Module names in channel callback errors

closes: #1728


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 (does not apply, only updated error msg)
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/) (does not apply, only updated error msg)
  • 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 #2387 (faeee41) into main (a278287) will not change coverage.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2387   +/-   ##
=======================================
  Coverage   79.56%   79.56%           
=======================================
  Files         175      175           
  Lines       12134    12134           
=======================================
  Hits         9655     9655           
  Misses       2050     2050           
  Partials      429      429           
Impacted Files Coverage Δ
modules/core/keeper/msg_server.go 58.29% <0.00%> (ø)

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Thanks! 🙏 Nice improvement

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

Thanks, @alizahidraja!

@alizahidraja alizahidraja changed the title added module names in channel callback errors improvement: added module names in channel callback errors Sep 26, 2022
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Thanks @alizahidraja! Unfortunately with middleware, these error messages can be misleading. If we have a middleware stack which is ICS29 and ICS20, if ICS20 returns an error in the application callback, the final error message will actually indicate that the module which failed was fee-middleware (which is incorrect).

I think it might make more sense to include the portID? We could also change the notion of the "module" variable to be a "middleware stack", though it'd be nice to think this approach out fully

@alizahidraja
Copy link
Contributor Author

Thanks for the insights @colin-axner! Will update the code to cater for the issue mentioned

@alizahidraja
Copy link
Contributor Author

Closing PR; Don't have access to the merging repo, will open a new one in the morning

@alizahidraja
Copy link
Contributor Author

Continued here

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.

Include Module name in channel callback errors
5 participants