effect icon indicating copy to clipboard operation
effect copied to clipboard

HttpApi: `transformClient` does not support composition with e.g. `HttpClient.retry`

Open fubhy opened this issue 1 year ago • 1 comments

What version of Effect is running?

No response

What steps can reproduce the bug?

It'd appear that adding a generic retry handler in the transformClient phase is not supported because the response handling of HttpApi is added later.

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

fubhy avatar Oct 01 '24 10:10 fubhy

In general I'd argue that the HttpApi and the HttpClient api are clashing a little bit in the transformClient code path. The interplay of HttpClient.retry, HttpClient.filter*, etc. with the underlying HttpApi declaration only becomes clear when following the implementation of HttpApiClient.make all the way.

I don't have any better suggestions so far but somehow this doesn't feel perfect yet :-)

fubhy avatar Oct 01 '24 11:10 fubhy