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 withCache errors cached forever #598

Merged
merged 2 commits into from
May 29, 2023

Conversation

iuriiiurevich
Copy link
Contributor

@iuriiiurevich iuriiiurevich commented May 29, 2023

Fixes #597


PR-Codex overview

This PR focuses on fixing an issue in withCache where the promise cache would not clear upon rejection.

Detailed summary

  • Added a try block to wrap the await statement.
  • Moved the cache.response.set call before the return statement.
  • Added a finally block to clear the promise cache.

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

@changeset-bot
Copy link

changeset-bot bot commented May 29, 2023

🦋 Changeset detected

Latest commit: 637089f

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

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

@vercel
Copy link

vercel bot commented May 29, 2023

@iuriiiurevich is attempting to deploy a commit to the wagmi Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom merged commit baea299 into wevm:main May 29, 2023
@github-actions github-actions bot mentioned this pull request May 29, 2023
jxom added a commit that referenced this pull request Jun 2, 2023
* fix withCache errors cached forever

* chore: changeset

---------

Co-authored-by: moxey.eth <[email protected]>
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.

bug: errors are cached in getBlockNumber (withCache) forever
2 participants