Handling API Call Retries with Conditional Array Updates in TypeScript
Hey Effect community!
Does anyone know how I should approach a problem where
1) have an array of contents
2) make API call with the array
3) if API response isn't valid structure -> add an item to array of contents
4) retry the chain WITHOUT adding any more items to the array even if it fails
Currently I have a Ref, and then
The problem is that
Thank you in advance!!
Does anyone know how I should approach a problem where
1) have an array of contents
2) make API call with the array
3) if API response isn't valid structure -> add an item to array of contents
4) retry the chain WITHOUT adding any more items to the array even if it fails
Currently I have a Ref, and then
Effect.retry, but I think I'm in over my depth how to model such bit more complicated thingsThe problem is that
retriedEffect just becomes Successful and the value is undefined (return type of messages.add)... It should not be successful when the orElse is called..Thank you in advance!!
