Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

[C-782] Catch fetch errors in AudiusBackend#1683

Merged
sliptype merged 1 commit into
mainfrom
sk-c-782-fix-error-handling
Aug 5, 2022
Merged

[C-782] Catch fetch errors in AudiusBackend#1683
sliptype merged 1 commit into
mainfrom
sk-c-782-fix-error-handling

Conversation

@sliptype

@sliptype sliptype commented Aug 5, 2022

Copy link
Copy Markdown
Contributor

Description

We weren't awaiting the fetch promises and there was no .catch so errors were not being caught, causing the app to crash. Added await for each fetch call, ideally we would refactor so there are no chained thens also but that isn't necessary right away

Dragons

Is there anything the reviewer should be on the lookout for? Are there any dangerous changes?

Because we are catching more errors now this should be fairly safe, the impact being that something that did cause the app to crash before no longer does so

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.

How will this change be monitored?

For features that are critical or could fail silently please describe the monitoring/alerting being added.

Feature Flags

Are all new features properly feature flagged? Describe added feature flags.

@audius-infra

Copy link
Copy Markdown
Collaborator

Preview this change https://demo.audius.co/sk-c-782-fix-error-handling

@raymondjacobson raymondjacobson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sensible way to do this change

@raymondjacobson

Copy link
Copy Markdown
Member

I assume you tested by throwing or blocking a network req.

@sliptype

sliptype commented Aug 5, 2022

Copy link
Copy Markdown
Contributor Author

I assume you tested by throwing or blocking a network req.

Yup, exactly! blocked network requests to test

@sliptype

sliptype commented Aug 5, 2022

Copy link
Copy Markdown
Contributor Author

@sliptype sliptype merged commit 5a66847 into main Aug 5, 2022
@sliptype sliptype deleted the sk-c-782-fix-error-handling branch August 5, 2022 16:14
audius-infra pushed a commit that referenced this pull request Aug 6, 2022
[c3682b3] [C-780] Update AudiusBackend to work in native context (#1677) Dylan Jeffers
[398093d] [C-781] Add minimum threshold to common password check (#1684) Kyle Shanks
[5a66847] Ensure fetch calls are awaited so errors are caught (#1683) Sebastian Klingler
[d597054] Make audiusBackend configurable for different environments (#1670) Sebastian Klingler
[b5fa3fa] Fix native build with new metro-config dependencies (#1676) Dylan Jeffers
[408a425] [C-771] Update native metro-config to enable @audius/sdk (#1671) Dylan Jeffers
[afde38e] [PAY-416] Early access mode & feature flag refactor (#1654) Michael Piazza
[3b28c7e] Fix typecheck for mobile after AudiusBackend ts migration (#1672) Sebastian Klingler
[e5fbbb5] Revert "Revert "Update explore endpoints in libs to use v1 (#1539)" (#1609)" (#1669) Joseph Lee
[237784b] Default endpoints to empty array instead of null (#1665) Marcus Pasell
[175e5d6] Add ModalContentPages to stems (#1659) Marcus Pasell
[fdadaac] fix mobile menu on narrow (#1664) nicoback2
[3e2b499] Convert AudiusBackend to typescript (#1650) Sebastian Klingler
@AudiusProject AudiusProject deleted a comment from linear Bot Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants