zio-http icon indicating copy to clipboard operation
zio-http copied to clipboard

Allow applying aspects only to handlers with `Request` input (#3141)

Open 987Nabil opened this issue 1 year ago • 2 comments

The actual bug was, that the handler aspect could be applied to a handler that has a input different then request. There was a construct that should have prevented it, but it did not work.

To make it easier to add aspects to a single route, I added @@ methods to Route too. And a test that shows, that it works with path parameters

fixes #3141 /claim #3141

987Nabil avatar Sep 18 '24 22:09 987Nabil

@jdegoes This is not binary compatible. In fact it would make code not compile that compiled before. But that code would be impossible to run anyway.

I tried to make it possible to apply context aspects to arbitrary handlers, but from what I see, that is not possible. If you have an idea how it could work let me know. But I fear this breaking change is our best option 😞

The only other good way I see is to deprecate the method and find a new operator.

987Nabil avatar Sep 18 '24 22:09 987Nabil

Any update on this?

Petter-K avatar Oct 03 '24 08:10 Petter-K