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
Merged
Conversation
Collaborator
|
Preview this change https://demo.audius.co/sk-c-782-fix-error-handling |
raymondjacobson
approved these changes
Aug 5, 2022
raymondjacobson
left a comment
Member
There was a problem hiding this comment.
sensible way to do this change
Member
|
I assume you tested by throwing or blocking a network req. |
Contributor
Author
Yup, exactly! blocked network requests to test |
Contributor
Author
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We weren't awaiting the fetch promises and there was no
.catchso errors were not being caught, causing the app to crash. Addedawaitfor each fetch call, ideally we would refactor so there are no chainedthens also but that isn't necessary right awayDragons
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.