Skip to content

fix: set EIP1193ProviderRpcError name - #5558

Merged
jxom merged 1 commit into
mainfrom
fix/eip1193-provider-rpc-error-name
Nov 18, 2026
Merged

jxom merged 1 commit into
mainfrom
fix/eip1193-provider-rpc-error-name

Conversation

@jxom

@jxom jxom commented Nov 18, 2026

Copy link
Copy Markdown
Member

EIP1193ProviderRpcError extended Error without setting name, so it reported 'Error' while its exported EIP1193ProviderRpcErrorType alias declares 'ProviderRpcError'. It now sets name = 'ProviderRpcError'.

The switchChain and watchAsset snapshots change only in their name prefix, because the test provider throws this error without wrapping it. These snapshots fail without the fix.

This is a narrower version of #5554. It leaves the base ProviderRpcError / RpcError name logic in src/errors/rpc.ts (name || cause.name) unchanged, since every subclass passes its own name.

Credit to @mortezashojaei for reporting it in #5554.

EIP1193ProviderRpcError reported 'Error' while its exported
EIP1193ProviderRpcErrorType alias declares 'ProviderRpcError'.

Co-authored-by: Morteza Shojaei <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-01a1ea53-5366-71a9-973d-3d0a9ba44649
Co-authored-by: jxom <[email protected]>
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
viem Error Error Nov 18, 2026 4:42am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: abc5c4d

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T04:41:21.381667Z abc5c4d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

Published [email protected] under the pr-5558 dist-tag, which follows this pull request until it closes.

pnpm add viem@pr-5558
pnpm add [email protected]

@jxom
jxom merged commit 90e59eb into main Nov 18, 2026
36 of 38 checks passed
@jxom
jxom deleted the fix/eip1193-provider-rpc-error-name branch November 18, 2026 21:35
@github-actions github-actions Bot mentioned this pull request Nov 18, 2026

This branch had an error being deployed

1 failed deployment
Preview — abc5c4d4 Deployed Nov 18, 2026 by vercel[bot]
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