Implementing a Retry Schedule Based on Error Information in Effect Typescript

Hi there! I'm trying to implement a schedule that should be based on a duration derived from some information in the error channel of an effect that I want to repeat. To be more concrete: I have a RequestServerError that might contain a 429 status code alongside a Retry-After header. This should determine the amount of time to wait before the effect is being retried. I cannot figure out how to do that. Can someone help? Ideally it should not try indefinitely but only x times.
Was this page helpful?