Conversation
# Conflicts: # packages/connect-multichain/CHANGELOG.md
jiexi
reviewed
Jun 1, 2026
| mockCore.invokeMethod.mockRejectedValue( | ||
| new RPCInvokeMethodErr( | ||
| 'RPC Request failed with code 4001: User denied transaction signature.', | ||
| 'User rejected the request', |
jiexi
reviewed
Jun 1, 2026
| ); | ||
| const ancestorMessage = getFirstNonEmptyMessage([ | ||
| primitiveMessage, | ||
| ...ancestorObjects.map((object) => object.message), |
Member
There was a problem hiding this comment.
i'm not certain it makes sense to try to resolve an error message from earlier up in the chain. Hard for me to fully understand this problem though. What were your thoughts around this?
jiexi
reviewed
Jun 1, 2026
| * @param error - Unknown error thrown or returned during method execution. | ||
| * @returns Canonical fields for RPCInvokeMethodErr. | ||
| */ | ||
| function getInvocationErrorDetails(error: unknown): InvocationErrorDetails { |
Member
There was a problem hiding this comment.
thoughts on moving all these newly added error helpers into their own file?
Member
There was a problem hiding this comment.
quite a bit of complexity in this helper. How deeply nested are we expecting causes to be?
jiexi
reviewed
Jun 1, 2026
Member
There was a problem hiding this comment.
seems unrelated to this main purpose of this PR
jiexi
reviewed
Jun 1, 2026
Member
There was a problem hiding this comment.
seems unrelated to this main purpose of this PR
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.
Explanation
connect-multichain.invokeMethod()could surface different error shapes depending on whether a wallet error arrived as a resolved JSON-RPC error response or as a rejected transport error. That also meantconnect-evmcould lose provider-facing details when adapting multichain errors to EIP-1193 request errors.This change normalizes wallet invocation failures at the
RequestRouterboundary:code,message, and JSON-RPCdatafrom response errors and wrapped transport errorscausechain so transport/API wrappers do not hide the wallet errorRPCInvokeMethodErrwhile preservingreason,rpcCode,rpcMessage, andrpcDataRPCInvokeMethodErrinstances unchangedconnect-evmnow maps normalizedRPCInvokeMethodErrinstances into EIP-1193-facing errors that carry the walletcode, provider-facingmessage, and JSON-RPCdatawhen present.References
Checklist