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

Fix null pointer exception in getNodeError check for ExecutionRevertedError #2769

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

tuna1207
Copy link
Contributor

@tuna1207 tuna1207 commented Sep 25, 2024

Overview

This PR fix null pointer exception in getNodeError check for ExecutionRevertedError

Detailed summary

When using viem client with custom provider, i faced null pointer exception because the error walk check for ExecutionRevertedError in getNodeError didn't check for null cause in error returned from provider.
This PR added null check in ExecutionRevertedError walk check and test case for it.

Screenshot_2024-09-24_at_14 34 50


PR-Codex overview

This PR focuses on fixing an undefined reference issue in the getNodeError function and adding a new test case for handling errors with a null cause.

Detailed summary

  • Fixed undefined reference in getNodeError by updating the type check to handle null and undefined values.
  • Added a new test case for UnknownNodeError to check error handling when the cause is null.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Sep 25, 2024

🦋 Changeset detected

Latest commit: 522cd09

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Sep 25, 2024

Someone is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom merged commit ed22d38 into wevm:main Sep 25, 2024
11 of 25 checks passed
@github-actions github-actions bot mentioned this pull request Sep 25, 2024
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