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

Error: Fetch failed with status '403': '' in new-network-info #20853

Closed
DDDDDanica opened this issue Sep 13, 2023 · 0 comments · Fixed by #20977
Closed

Error: Fetch failed with status '403': '' in new-network-info #20853

DDDDDanica opened this issue Sep 13, 2023 · 0 comments · Fixed by #20977
Assignees
Labels
area-Sentry error reporting to sentry release-11.3.0 Issue or pull request that will be included in release 11.3.0 team-extension-platform

Comments

@DDDDDanica
Copy link
Contributor

https://metamask.sentry.io/issues/3404840685/?referrer=github_plugin

Error: Fetch failed with status '403': ''
  at _default (shared/lib/fetch-with-cache.js:42:11)
  at checkTokenDetection (ui/components/ui/new-network-info/new-network-info.js:52:40)
  at checkTokenDetection (ui/components/ui/new-network-info/new-network-info.js:61:11)
@DDDDDanica DDDDDanica self-assigned this Sep 13, 2023
@gauthierpetetin gauthierpetetin added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 21, 2023
DDDDDanica added a commit that referenced this issue Sep 22, 2023
## **Description**
Fix: #20853
For sentry error: 

https://metamask.sentry.io/issues/3404840685/events/a304e0a6b9784a7780254191cdb0dc59/?project=273505
<img width="1359" alt="Screenshot 2023-09-20 at 21 37 05"
src="https://github.com/MetaMask/metamask-extension/assets/12678455/021e6e39-90f4-4ed1-8c4b-c7aedd7d8d5f">

In UI level, the error should be captured and contribute to a state that
renders the <add token manually> link. Therefore, we do not need extra
UI element to deal with the error. When the error shows up, we want to
capture in the `catch` and set that state again just in case.

## **Manual testing steps**
1. change `{shouldShowNetworkInfo && <NewNetworkInfo />}` to
`<NewNetworkInfo />` in `ui/pages/routes/routes.component.js` for
testing purpose
2. Enable auto token detection
3. go to network and block the request starting from `0x`
4. You should see the <add link> in the new token information pop up.
 
## **Screenshots/Recordings**

### **Before**

_[screenshot]_

### **After**


[_[screenshot]_](https://github.com/MetaMask/metamask-extension/assets/12678455/c050e9ad-4918-4656-8625-ade2068fbfa7)

## **Related issues**

_Fixes #20853

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [x] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [x] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 22, 2023
@metamaskbot metamaskbot added the release-11.3.0 Issue or pull request that will be included in release 11.3.0 label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Sentry error reporting to sentry release-11.3.0 Issue or pull request that will be included in release 11.3.0 team-extension-platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants