GoodDollar / GoodDAPP

GoodDollar.org Wallet is the simplest access point to Claim your daily G$. It Is based on web3 and React native web.
good-dapp.vercel.app
MIT License
101 stars 52 forks source link

dont log network errors to sentry #4192

Closed L03TJ3 closed 5 months ago

L03TJ3 commented 5 months ago

Description

analyis shared in original issue (read comment first before review: https://github.com/GoodDollar/GoodDAPP/issues/4175#issuecomment-1907112585)

got partially fixed already here: https://github.com/GoodDollar/GoodDAPP/commit/7c95d33a5fb2f4006ab8e2012c7bed1706bee2d0

About # (link your issue here)

4175

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

vercel[bot] commented 5 months ago

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

Name Status Preview Comments Updated (UTC)
good-dapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 11:58pm
2 Ignored Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **gooddollar-delta** | ⬜️ Ignored ([Inspect](https://vercel.com/gooddollarteam/gooddollar-delta/CjUVN7g1mYArHeEpFeHbwawtGyKQ)) | [Visit Preview](https://gooddollar-delta-git-4175-syncfromexplore-4bd209-gooddollarteam.vercel.app) | | Jan 23, 2024 11:58pm | | **goodid** | ⬜️ Ignored ([Inspect](https://vercel.com/gooddollarteam/goodid/FhfU5Lo1Ybvyy4kwFQXGZcAByGsc)) | [Visit Preview](https://goodid-git-4175-syncfromexplorer-failed-gooddollarteam.vercel.app) | | Jan 23, 2024 11:58pm |
L03TJ3 commented 5 months ago

@L03TJ3 look at this PR 7c95d33

it prevents all RPC network errors to be logged

implement the corresponding way:

  • add function checking isExplorerConnectionError
  • add logging helper for explorer errors like I've done in wallet/utils
  • use this helper wherever it needs
  • to implement this AxiosError: syncTxFromExplorer failed: Network Error #4175 (comment) you could just define an module global const with the map having urls as keys and logged status as values

@johnsmith-gooddollar Network error was the only thing missing in that regex, and since it was already defined in the filteredNetworks (which we already skip and don't log to amplitiude) I added it to the analytics class. There was nothing else to do as you fixed all the other places for the rpc errors.

So not sure I understand your suggestion..