Refactor Error Handling with Effect Functions for Sentry Reporting
I am trying to process request errors into a format that can be used within the app. The type that goes into
I created a tap function to send Sentry reports in problematic situations, as shown below:
The situations where Sentry reports will not be sent are as follows:
1. When the network is offline
2. When the data received as a result of a failed response matches the schema allowed by the app
I wrote the following code; is it possible to refactor this further using Effect functions?
catchAll is as follows: Effect<Data, NetworkOfflineError | HTTPError | TimeoutError | Error, never>I created a tap function to send Sentry reports in problematic situations, as shown below:
The situations where Sentry reports will not be sent are as follows:
1. When the network is offline
2. When the data received as a result of a failed response matches the schema allowed by the app
I wrote the following code; is it possible to refactor this further using Effect functions?
