Skip to content

Add multichain error codes #2063

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

alexandratran
Copy link
Contributor

@alexandratran alexandratran commented May 29, 2025

Description

Add table with Multichain API error codes.

Preview

https://metamask-docs-q54mtd23a-consensys-ddffed67.vercel.app/wallet/reference/multichain-api/#error-codes

Checklist

Complete this checklist before merging your PR:

  • If this PR contains a major change to the documentation content, I have added an entry to the top of the "What's new?" page.
  • The proposed changes have been reviewed and approved by a member of the documentation team.

@Copilot Copilot AI review requested due to automatic review settings May 29, 2025 22:38
@alexandratran alexandratran requested review from a team as code owners May 29, 2025 22:38
Copy link

vercel bot commented May 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
metamask-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2025 10:39pm

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR expands the documentation by adding a table of Multichain API error codes and improves code formatting in markdown pages through SCSS styling updates.

  • Added a new "Error codes" section with a table in the multichain API reference markdown.
  • Updated the SCSS theme to style inline code, ensuring a consistent look in markdown content.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
wallet/reference/multichain-api.md Added a table listing Multichain API error codes along with descriptions and related methods.
src/scss/theme/_markdown.scss Introduced styles for code blocks to use a monospace font with a slightly smaller font size.

| Code | Description | Related methods |
| ---- | ----------- | --------------- |
| 5000 | Unknown error with request | `wallet_revokeSession`, `wallet_createSession` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vandan @adonesky1 we're firing -32603 on wallet_revokeSession, same for wallet_createSession

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I don't see error codes in that range anywhere in the CAIP standards for this so it seems like we should instead map any errors fired to codes in the 5000 range (ex. 5500, 5501, or 5502 for wallet_revokeSession).

| 5101 | Requested methods are not supported | `wallet_createSession` |
| 5102 | Requested notifications are not supported | `wallet_createSession` |
| 5300 | Invalid `scopedProperties` requested | `wallet_createSession`|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we aren't technically firing this yet. thoughts, @adonesky1 ?

| 5102 | Requested notifications are not supported | `wallet_createSession` |
| 5300 | Invalid `scopedProperties` requested | `wallet_createSession`|
| 5301 | `scopedProperties` can only be outside of `sessionScopes` | `wallet_createSession`|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe we treat this as invalid scope object and simply ignore the scopeobject. thoughts, @adonesky1 ?

@vandan
Copy link
Contributor

vandan commented May 29, 2025

@jiexi can we supply a fresh list based on the error codes we support?
Were these error codes taken from the relevant CAIPs?

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.

3 participants