Unfortunately, Akka Http resolves complete(Future(())) with an http response with code 200 and empty body — same as complete(Future(None))! Please, put a comment below if you know the rationale behind this design choice.
It picks up de.heikoseeberger.akkahttpjson4s.Json4sSupport#json4sMarshaller for Unit as well, causing unexpected outcome. I see it may be tough to change the types around given how this works here but worth pointing out or thinking about perhaps.
The text was updated successfully, but these errors were encountered:
We've stumbled over these kind of things in the past as well (e.g. in spray/spray#990 (comment)). One conservative "solution" would be not to provide any reflection-based implicit marshallers automatically at all. Instead, the developer would need to create a little library of domain type marshallers as suggested by @sirthias in the above thread.
I.e. json4sMarshaller is either made not implicit or at least it is not imported and the user then creates tightly scoped implicits with