Skip to content

Conversation

zeevick10
Copy link

Description

  • Refactored decodeMessage to handle invalid input gracefully (returns null instead of throwing).
  • Updated imports to use the recommended ethers v6+ style.

Copy link
Contributor

@JohnGuilding JohnGuilding left a comment

Choose a reason for hiding this comment

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

Thanks for raising this @zeevick10!

One issue with this change is that returning null in all cases swallows the actual errors which is useful information to the developer

Another pattern is to have tryDothing and doThing where one function fails gracefully and the other throws all errors. But not sure we want to do that here.

@vplasencia what are your thoughts on this?

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.

2 participants