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

feat: add error parsing for the invalid argument type #47

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

challet
Copy link
Contributor

@challet challet commented Mar 9, 2023

Is your pull request closing an issue?

Please explain the main changes of your pull request

Handles INVALID_ARGUMENT error type which can be thrown for instance by the getAddress method.

Checklist

  • Have you added any new returned codes to the README file ?
  • Have you added new tests for your change?

@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2023

Codecov Report

Merging #47 (7e5bbfe) into main (f9dc429) will not change coverage.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff            @@
##              main       #47   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          666       691   +25     
  Branches        79        81    +2     
=========================================
+ Hits           666       691   +25     
Impacted Files Coverage Δ
lib/__tests__/getParsedEthersError.test.ts 100.00% <100.00%> (ø)
lib/constants.ts 100.00% <100.00%> (ø)
lib/utils/getTopLevelKnownError.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@challet
Copy link
Contributor Author

challet commented Mar 9, 2023

Hi, I'm not sure this is the way to go since, in that case, the original error has more data (especially the argument property which could be programmatically used). Making this PR to open the discussion.
As an alternative, could it be considered that some ethers error should be kept as they are ? Or maybe to add an extra property to the ReturnValue to hold a context object ?

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.

None yet

2 participants