Repository navigation
ProviderRpcError default runtime names disagree with exported literal aliases - #5554
Closed
mortezashojaei wants to merge 1 commit into
Closed
mortezashojaei wants to merge 1 commit into
mortezashojaei wants to merge 1 commit into
Conversation
Default `types.ProviderRpcError` (`EIP1193ProviderRpcError`) and `errors.ProviderRpcError` to the `ProviderRpcError` name their exported `ProviderRpcErrorType` aliases declare, so a consumer comparing runtime names does not miss them. A caller-supplied name and a subclass name still win, and the RPC wrapper keeps its cause chaining, code, data, and details. Add regression coverage for default construction, an explicit name, and a subclass, and update the snapshots that observed the previous defaults.
🦋 Changeset detectedLatest commit: e361bec The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
@mortezashojaei is attempting to deploy a commit to the Wevm Team on Vercel. A member of the Team first needs to authorize it. |
Member
|
Thanks @mortezashojaei! Closing in favour of #5558, which keeps only the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Both provider error classes now default to
name: 'ProviderRpcError', matching their exported literal error aliases.The RPC wrapper retains explicit non-empty names, and subclasses retain their own names. Error codes, data, details, and causes are preserved. Includes a patch changeset.
Evidence
The diff adds regression coverage for default construction, an explicit custom name, a subclass name, and preserved error fields. It also updates the affected
switchChainandwatchAssetsnapshots.Before, default construction reported the cause's name or
Error. The updated assertions expectProviderRpcError. Test execution has not been independently verified in this description review.Merge Danger
Door: two-way
Blast Radius: errors
Consumers comparing the previous default names or snapshotting error output will observe the new name. The configurable RPC wrapper can still have a custom name, so its literal alias does not describe every possible instance.