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

Survive fetching delegations failures #879

Merged
merged 7 commits into from
Jul 1, 2022
Merged

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Jun 24, 2022

Related to #403

  • Revert 8c483c0 and use middleware to throw IndexerAPIError instead.
    (related cac52d1 and 6a59864)
  • Use the same middleware for oasisscan too
  • Survive getting delegations failures
  • Simplify displayed text of existing "survivable" errors and tell users to come back 🥺
Before After
Loading delegations error:
delegations_before delegations_after
Loading account error:
account_before account_after
Loading validators error:
validators_before validators_after

@lukaw3d lukaw3d requested review from buberdds and pro-wh June 24, 2022 20:06
@github-actions
Copy link

github-actions bot commented Jun 24, 2022

MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 26 0 0.06s
✅ GIT git_diff yes no 0.01s
✅ JSON eslint-plugin-jsonc 1 0 0 1.06s
✅ JSON jsonlint 1 0 0.3s
✅ JSON prettier 1 0 0 0.73s
✅ JSON v8r 1 0 1.21s
✅ TSX eslint 13 0 0 8.81s
✅ TYPESCRIPT eslint 11 0 0 5.56s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

@codecov
Copy link

codecov bot commented Jun 24, 2022

Codecov Report

Merging #879 (da530c1) into master (1b03ad7) will decrease coverage by 1.27%.
The diff coverage is 52.83%.

❗ Current head da530c1 differs from pull request most recent head f556050. Consider uploading reports for the commit f556050 to get more accurate results

@@            Coverage Diff             @@
##           master     #879      +/-   ##
==========================================
- Coverage   88.41%   87.14%   -1.28%     
==========================================
  Files          97       97              
  Lines        1606     1618      +12     
  Branches      336      347      +11     
==========================================
- Hits         1420     1410      -10     
- Misses        186      208      +22     
Flag Coverage Δ
cypress 57.78% <43.39%> (-2.95%) ⬇️
jest 73.74% <37.73%> (-0.93%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/components/FatalErrorHandler/index.tsx 71.42% <ø> (ø)
src/app/components/TransactionModal/index.tsx 91.66% <ø> (ø)
.../AccountPage/Features/TransactionHistory/index.tsx 76.92% <ø> (-15.39%) ⬇️
...pages/OpenWalletPage/Features/FromLedger/index.tsx 68.42% <0.00%> (ø)
...pages/StakingPage/Features/ValidatorList/index.tsx 68.57% <0.00%> (-4.16%) ⬇️
src/app/state/account/saga.ts 63.04% <0.00%> (-6.01%) ⬇️
src/app/pages/AccountPage/index.tsx 95.12% <33.33%> (-2.32%) ⬇️
src/app/state/account/index.ts 77.77% <50.00%> (ø)
src/app/state/staking/saga.ts 85.36% <58.82%> (-8.47%) ⬇️
src/app/state/staking/index.ts 80.76% <62.50%> (-6.74%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b03ad7...f556050. Read the comment docs.

Copy link
Member

@tjanez tjanez left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @lukaw3d, I think these are great improvements!

Looking at the screenshots, I think it would make sense to make these warnings about unreachable API backends stand out a bit more.

I would perhaps try with a yellow warning theme like in the text below:
Screenshot from 2022-06-27 11-05-19

src/app/components/ErrorFormatter/index.tsx Outdated Show resolved Hide resolved
src/locales/en/translation.json Outdated Show resolved Hide resolved
src/app/components/ErrorFormatter/index.tsx Outdated Show resolved Hide resolved
@lukaw3d lukaw3d changed the title Survive getting delegations failures Survive fetching delegations failures Jun 28, 2022
@buberdds
Copy link
Contributor

From UX perspective we are loosing an option to contact support and create support tickets via wallet@ email.

Can we either bring back support related sentence? Mihnea is suggesting that we could move support notice to footer/disclaimer.

{t('account.loadingError', "Couldn't load account. Information may be missing or out of date.")}{' '}
{account.accountError}
{t('account.loadingError', "Couldn't load account.")}{' '}
<ErrorFormatter code={account.accountError.code} message={account.accountError.message} />
Copy link
Member Author

Choose a reason for hiding this comment

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

@tjanez Looking at the screenshots, I think it would make sense to make these warnings about unreachable API backends stand out a bit more.

choose:

error warning
localhost_3000_account_oasis1qqsehts9fvmhujcsqtnx5c0wg6zcuxt9dulsatty localhost_3000_account_oasis1qqsehts9fvmhujcsqtnx5c0wg6zcuxt9dulsatty (1)

@lukaw3d lukaw3d merged commit 0d30102 into master Jul 1, 2022
@lukaw3d lukaw3d deleted the lw/delegations-fail branch July 1, 2022 20:12
@buberdds
Copy link
Contributor

buberdds commented Jul 4, 2022

Forgot to ask. With new type of error messages, do we still need to have disabled minification in production?

@lukaw3d
Copy link
Member Author

lukaw3d commented Jul 6, 2022

yeah, there's still gRPC errors and potentially others

@lukaw3d lukaw3d mentioned this pull request Jul 12, 2022
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.

None yet

3 participants