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

Update error messages which returned from ibc-go #2266

Merged
merged 1 commit into from
Jun 3, 2022
Merged

Update error messages which returned from ibc-go #2266

merged 1 commit into from
Jun 3, 2022

Conversation

kubo39
Copy link
Contributor

@kubo39 kubo39 commented Jun 3, 2022

Closes: #XXX

Description


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@romac
Copy link
Member

romac commented Jun 3, 2022

Wow, thanks for noticing and fixing this!

@adizere
Copy link
Member

adizere commented Jun 3, 2022

Good catch, thank you for the fix!

@ljoss17 and I bumped into this copy/past error just yesterday. We decided not to to anything with it until we understand what's up with the sdk_error_from_tx_result and the ClientError type.

My findings so far are:

  • It seems like we introduced this new type as part of error type refactoring in Use flex-error to define errors #988 and never made use of it.
  • Originally, the code comes from a big lift of Soares to categorize all error types and improve error handling overall in the relayer pipeline: Fine grained error handling #950 (file ref here). That PR was never merged, but I think the changes somehow slipped in master via Use flex-error to define errors #988.
  • That being said, I am on the fence whether to delete the code altogether or keep it around. It's unused so not a big maintenance burden or liability + it may prove useful in the future.

Since you fixed it for us, it seems like a good idea to keep the code, unless Romain has a different opinion -- will defer to him.

@adizere adizere mentioned this pull request Jun 3, 2022
5 tasks
@romac
Copy link
Member

romac commented Jun 3, 2022

Let's keep the code and see as a follow up if we can actually use it, would be nice to capture these errors using a proper error type.

@adizere adizere merged commit 09c9f9f into informalsystems:master Jun 3, 2022
@seanchen1991
Copy link
Contributor

Just for my own understanding, were these error message changes done so that they would match the errors returned by ibc-go?

@adizere
Copy link
Member

adizere commented Jun 6, 2022

Just for my own understanding, were these error message changes done so that they would match the errors returned by ibc-go?

The error string was wrong (copy/paste error). The changes were not done so that they match ibc-go, but so that the error string is consistent with the error type. The error codes have been copied from IBC-Go.

@soareschen
Copy link
Contributor

Thanks for the catch. Yes it was copy/paste errors when copying the error messages from the original definitions to the new error definitions using flex-error. Since there are so many error definitions, it was easy to slip up and copy wrongly.

@kubo39 kubo39 deleted the update-error-messges-returned-from-ibc-go branch June 6, 2022 07:55
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
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.

5 participants